Explanation:
the scenario creates 2 right-angled triangles.
both have the same first leg : the horizontal distance from Avani's eyes to the building (21 m).
and both have a right angle (90°) at the point, where the horizontal distance meets the building.
the difference is now the second leg : the height of the building (starting at 1.66 m above ground), and the height of the building plus the height of the antenna (again starting at 1.66 m above ground).
another difference is the length of the line of sight (from Avani to AA, and from Avani to BB).
driving these differences is the difference in the angle at Avani (38° vs. 46°).
now, remember the law of sine :
a/sin(A) = b/sin(B) = c/sin(C)
a, b, c are the sides of the triangle, A, B, C are the corresponding opposite angles of the triangle.
and remember : the sum of all angles in a triangle is always 180°.
what is the plan ?
we need to calculate the second leg of the larger triangle, and then the second leg of the smaller triangle and subtract that from the second leg of the larger triangle.
in other words :
(building + antenna) - building = antenna
so, we start with the larger triangle (up to BB).
the angle at Avani is 46°.
the angle at the building is 90°.
the angle at BB is then
180 - 90 - 46 = 44°.
21/sin(44) = (building + antenna)/sin(46)
(building + antenna) = 21×sin(46)/sin(44) =
= 21.74613659... m
now, for the smaller triangle (up to AA).
the angle at Avani is 38°.
the angle at the building is 90°.
the angle at AA is then
180 - 90 - 38 = 52°.
21/sin(52) = building/sin(38)
building = 21×sin(38)/sin(52) = 16.40699816... m
the height of the antenna is then again
(building + antenna) - building = 5.339138433... m
≈ 5.3 m