From this you can easily come to the algebraic equation that you see in most textbooks:
If the legs are called a resp. b and the hypotenuse is called c, then the area of the
second to the last picture can be described by
I. a2+b2+4ab/2 = (a+b)2
The last picture shows
II. c2+4ab/2 = (a+b)2
The right side of both of these equations is equal (both are in a square of the same size).
Therefore, the left side of the two equations is also equal.
a2+b2+4ab/2=c2+4ab/2
Subtract 4ab/2 from each side to obtain the famous formula
a2+b2=c2