Let the velocity at the top of the window be u.
Journey through the window :
1 = u(0.1) + (1/2)g(0.1)2
u = 9.5 m/s
Hence distance travelled upto the top of the window, x1 = u2/2g = 4.5125 m
Distance travelled through the window, x2 = 1 m
Velocity at the bottom of the window, v = u + g(0.1) = 10.5 m/s
Time taken by the ball to return to the window from the ground = 2 sec
Hence time taken to reach the ground from the bottom of window = 1 sec
Distance travelled from bottom of window to the ground, x3 =(10.5)1+(1/2)(10)12
x3 = 15.5
Hence height = x1 + x2 + x3 = 4.5125 + 1 + 15.5 = 21.0125 m