The building forms a right triangle with the street. The building is 40m in height, and the angle from the top of the building to the place where John Watson is standing is 50o.
The solution is provided by the tangent of the angle. Tangent is defined as the ratio of the side opposite the angle divided by the side adjacent to the angle.
In this case, let x = the length of the opposite side.
So, x ÷ 40m = tan 50o
x = tan 50o times 40m; the tangent of 50o ≅ 1.2
x ≅ 1.2 times 40m
x ≅ 48m