Step 1
First situation
when a ladder is leaning against a wall
Let
x——-> the distance of the bottom of the ladder from the wall
L——-> the length of the ladder
Find the length of the ladder
Applying the Pythagorean Theorem
——> equation
Step 2
Second situation
when the ladder will be lying flat on the ground
Find the length of the ladder
In this situation the length of the ladder is equal to
square both sides
——> equation
Step 3
equate equation and equation
therefore
the answer is
the length of the ladder is
see the attached figure to better understand the problem