As you can see in the picture, the ladder leaning against the wall makes a right triangle with the sides being the wall, the ground and the ladder. The ladder is opposite the right angle and so is the hypotenuse (the longest side of the triangle). The angle between the ladder and the ground is labeled a.
We know the height of the ladder (10 feet) and also the height off the ground of the windowsill (8.5 feet). That second side is opposite the angle a. So, when we consider angle a we know the length of the side opposite and of the hypotenuse.
Recall the sin of an angle can be found by using (opposite/hypotenuse).
So we have: sin a = 8.5 / 10. That is, sin a = .85
We are looking for the angle whose sin is .85 and can find this using the inverse sin function.
a is approximately 58.211669 degrees which is less than the 65 degrees and so safe.
Just to be on the safe side, I remind you that your calculator must be in degrees (not radians) to do this problem.