In the given figure, let CD be the smaller building and AB be the taller building
In Δ ADE
Tan 50∘=AEDE=AE20 (as AC = DE = 20 m)
AE=20. Tan 50∘=20×1.2=24 m
In Δ DBE
Tan 25∘=BEDE=BE20 (as AC = DE = 20 m)
BE=20. Tan 25∘=20×0.46=9.3 m
Height of the taller building =AB=AE+EB=24+9.3=33.3 m