let $\displaystyle h$ = length of the triangles' vertical side
$\displaystyle \tan(15) = \frac{h}{x} $
$\displaystyle x \tan(15) = h$
$\displaystyle \tan(27) = \frac{h}{x-65}$
$\displaystyle (x-65)\tan(27) = h$
since $\displaystyle h = h$ ...
$\displaystyle (x-65)\tan(27) = x\tan(15)$
solve for x