(sorry about bad drawing - my GIMP skills are hopeless)
But yeah, that hopefully explains depression and elevation. Looking up from the direct line - that is the horizontal area that is 0 degrees is the elevation point (so it's out of proportion on my picture).
Now Height X is equal to 50.2 metres (which is given in the question). From there and using the angle of depression we can find the distance between the two buildings. Which is found by (using tangent = opposite/adjacent):
With that found you can now find Y. Again, it's found like this:
tan(18.3) = (distance between buildings)/50.2
= tan(18.3) * 50.2 = 16.6021
Then you add the values of X and Y to get the height of the building. Perhaps round it down - but yeah.
tan(56.5) * 16.6021 = y
y = 25.083
Check my numbers, but hopefully you understand the concept. Be sure to add the measurement units to your answer. Often a diagram will help with the problem