Let the distance between the tower and the building be \( AB = 10\sqrt{3} \). Let \( C \) be the top of the tower, and \( D \) be the top of the building.
From triangle \( \triangle CAB \): \[ \tan(60^\circ) = \frac{h_1}{10\sqrt{3}} \Rightarrow \sqrt{3} = \frac{h_1}{10\sqrt{3}} \Rightarrow h_1 = 30 \] From triangle \( \triangle DAB \): \[ \tan(30^\circ) = \frac{h_2}{10\sqrt{3}} \Rightarrow \frac{1}{\sqrt{3}} = \frac{h_2}{10\sqrt{3}} \Rightarrow h_2 = 10 \] So, the total height = \( h_1 + h_2 = 30 + 10 = 40 \)