Both the ladder and the ramp make a right triangle when leaned up against the building. The height of the window does not change only the angle and hypotenuse (length of ladder or ramp)
So you can use the Sine function to first find the height of the window (opposite side) then use it to find the new angle for the ramp.
Sin(30) = w/10
10Sin(30) = w
5 = w
Sin(Ф) = 5/20
ArcSin(1/4) = Ф
14.47 ° = Ф