Since we are given with the height of the window and the angle of depression, we can get the distance between the two buildings, x
tan 45 = 10 / x
x = 10 / tan 45
x = 10
Since we are also given with the angle of elevation from the window to the top of the next building, we can get the vertical distance from the window to the top of the building, y
tan 60 = y / 10
y = 10 tan 60
y = 17.32
Therefore, the height of the building is
17.32 + 10 = 27.32