Let distance between the foot of tower and point of observation
CD=x
y= height of tower
In ΔACD
cotθ=xh+y
(h+y)cotθ=x...............(1)
IN ΔBCD
cotϕ=xy
x=ycotϕ......................... (2)
From (1) & (2) (h+y)cotθ=ycotϕ
hcotθ=y(cotθ−cotϕ)
y=hcotθcotϕ−cotθ=htanθ(tanθtanϕtanθ−tanϕ)
(height of tower ) y=hcosϕtanθ−tanϕ