The square of the hypotenuse of a right angled triangle is equal to the sum of the squares of the sides.
Take a square of sides length a + b inscribed by another square connecting the points a distance a from each consecutive cornert of the first square.
Let the length of the sides of the inscribed square be c.
Thus each side of the inscribed sqaure forms the hypotonuse of a right angled triangle having sides of length a, and b.
The area of the larger square is (a+b)2 = a2+ b2+2*a*b
The area of the larger square is also equal to the area of the smaller square plus the area of the four right angled triangles of sides length a and b and hypotenuse c.
This is equal to c2 + 4* (a*b)/2
So a2+ b2+2*a*b = c2+ 2*a*b
So a2 + b2 = c2