The tangent of the angle relates the opposite side (height above the window) to the adjacent side (distance between buildings) in the right triangle that models this geometry.
Tan = Opposite/Adjacent
tan(35°) = (height above window)/(distance between buildings)
height above window = (52 ft)tan(35°) ≈ 36.4 ft
Added to the window height of 20 ft, the height of the other building is ...