As i was taught you would use the Pythagorean Theorem, A^2+B^2=c^2 or (AxA)+(BxB)=(CxC)
so if the ladder is 20ft tall the hypotenuse would be 20ft. Now if the ladder is place 5ft from the way the shortest side adjacent to the 90 degree angle would be 5ft
therefore,
20^2=b^2+5^2
400= B^2+25
(400-25)=B^2+(25-25)
375=b^2
The ladder will reach 19.36ft