This is just an application of Pythagoras' theorem. The ladder is the hypotenuse of a right triangle formed by the building. The Hypotenuse is 15 ft, and side a (the floor,) is 6 ft. PLugging this into the theorem, we get
15^2 = 6^2 + b^2
225 = 36 + b^2
189 = b^2
b is approximately 13.7478