This is the concept of application of geometry; the distance that the ladder should be placed will be given by Pythagorean theorem.
thus;
c^2=a^2+b^2
where, c=hypotenuse, a and b are the legs
hence;
15^2+12^2+b^2
b^2=15^2-12^2
b^2=225-144
b^2=81
getting the square root of both sides;
b=sqrt81
b=9
therefore the ladder should be placed 9 feet from the wall for it to reach 12 feet up the building