Draw a horizontal line indicating the distance between the buildings at the height of the shorter building (and thus also indicating the width of the river, assuming, contrary to "real life", that the buildings are directly on the river's banks). Label as "r".

Draw a vertical line at one end, indicating the (remaining) height of the taller building. Label as 27 - 15 = 8.

Draw a slanty line indicating the line of sight from the top of the shorter to the top of the larger building. Label the angle at the shorter building as 52 degrees.

Note that 8/r = tan(52 degrees)....