Often, it's a matter of envisioning the problem, especially this kind.
So, sketch the givens:
--- draw the ground (horizontal line on the page)
--- draw a vertical line for the short building (perpendicular to the ground line
--- draw a vertical line for the taller building.
--- draw a line perpendicular to the taller line to the "top" of the shorter building
--- draw a line from the top of the shorter building to the top of the other one
--- draw a line to the top of the shorter building to the bottom of the other
Now, put in the numbers that you know:
the ground between the buildings is 35 metres So two lines have this length.
the angle between the line across from the shorter building and the line to the top of the taller building is 21 degrees, and the line to the bottom of the taller building is 47 degrees.
Now use what you know of trigonometry, geometry and algebra.
Let h be the height of the taller building
and x be the height of the shorter building
so tan(21) = (h-x)/35
==> h-x = 35tan(21)
and tan(47) = x/35
==> x = 35tan(47)
you have two equations:
add them together
and you get:
h = 35tan(21) + 35tan(47) = 35 (tan(21) + tan(47))
look up tan(21) and tan(47) (or use your calculator)
and do the arithmetic
and you have the right answer