how far from the wall should he place the ladder? If his ladder is 13 feet long and has to reach a 12 feet window.

hard way:

12^2 + d^2 = 13^2
d = 5

easy way: recognize that you have a 5-12-13 right triangle.