I'm going into Machine Learning and am currently brushing up on some Calculus on Coursera. Everything was going smoothly until I got to this word problem:
A ladder rests against a wall. The top of the ladder touches the wall at height $12$ meters. The length of the ladder is $4$ meters longer than the distance from the base of the ladder to the wall. Find the length of the ladder.
I am confused as to how to deduce the hypotenuse from the information given above. And have sat here trying different things with no success. What am I missing?

Let $d$ be the distance from the ladder to the wall, and $l$ the length of the ladder. Then
$l = d + 4; \tag 1$
since the wall is mos' likely perpendicular to the ground, we may deploy the Pythagorean theorem and write
$l^2 = (12)^2 + d^2; \tag 2$
substituting (1) into (2) yields
$(d + 4)^2 = 144 + d^2, \tag 3$
$d^2 + 8d + 16 = 144 + d^2, \tag 4$
$8d + 16 = 144 \Longrightarrow 8d = 128 \Longrightarrow d = 16M \Longrightarrow l = 20M. \tag 5$