In a diagram,
Where l is the length of the ladder.
Therefore, using the Pythagorean theorem,
[tex]l^2=(l-2)^2+(l-4)^2[/tex]Solving for l,
[tex]\begin{gathered} \Rightarrow l^2=l^2-4l+4+l^2-8l+16 \\ \Rightarrow l^2-12l+20=0 \end{gathered}[/tex]Solve using the quadratic formula,
[tex]\begin{gathered} \Rightarrow l=\frac{12\pm\sqrt{144-4*20}}{2} \\ \Rightarrow l=\frac{12\pm\sqrt{64}}{2} \\ \Rightarrow l=\frac{12\pm8}{2} \\ \Rightarrow l=2,10 \end{gathered}[/tex]However, notice that if l=2, l-4 would be negative which is impossible as it is a length.
Therefore, the only valid answer is l=10.