The height of the second building H = h + 24
tan θ = adjopp
tan 30∘=xh
⟹33=xh
⟹x=3=3h
⟹x=33h ....(i)
tan 60∘=x24
⟹3=x24
⟹x3=24
⟹x=324 ....(ii)
Equate equation (i) and (ii)
⟹33h=324
⟹ 3h = 24
⟹h=324 = 8m
∴The height of the second building = 8 + 24 = 32m