Letting the height of the tower be $h$, and the initial distance to the tower be $D$ we arrive initially at the equation:
$tanX = \frac{h}{D}$
After crossing the road, the equation becomes,
$tanY = \frac{h}{\sqrt{D^2 + 10^2}}$
Equating the two yields,
$DtanX = \sqrt{D^2 + 10^2}tanY$
Thus,
$D^2tan^2X = D^2tan^2Y + 100tan^2Y$
Thus,
$D = \sqrt{\frac{100tan^2Y}{tan^2X - tan^2Y}}$
Now we have $D$ we can substitute back into the initial equation to find $h$ as,
$h = tanX\sqrt{\frac{100tan^2Y}{tan^2X - tan^2Y}}$