This requires Pythagoras' theorem which says that the square of the hypotenuse = square of another side + the square of another side.
Therefore, a² = b² + c² where a is the length of the ladder, and b and c are the wall and floor.
If the ladder is 13 feet long, and the bottom of the ladder is 5 feet long then:
13² = 5² + c²
So 13² - 5² = c²
So c² = 144, and √144 = 12. So c = 12.
The second part is:
13² = 8²( because 5 + 3 = 8) + c²
Therefore, 13² - 8² = c²
c² = 105
c = √105 so c= 10.25 (rounded to 2 dp)
Finally, since c indicates how high the ladder is against the wall, to find the distance moved you need to do 12 - 10.25 so the distance moved is 1.75 feet.