Example 28 : A ladder 10m long rests against a vertical wall. If the foot of the ladder is 6m away from the wall and the ladder just reaches the top of the wall