Here is a way of showing that (a+b)2=a2+2ab+b2.
In the picture ABFD is a square with side length a, so its area is a2. (DA=a is shown.)
Also, AB=DF=BF=a because they are the sides of the same square.
FIGH is a square with side length b, so its area is b2. (GI=b is shown.)
Also, HG=FI=HF=b because they are the sides of the same square.
And the big square ACGE has side lengths a+b, so its area is (a+b)2.
We can see that ACGE is made up of two squares, ABFD and FIGH, and two rectangles, BCIF and DFHE.
The area of each rectangle is ab, so since there are two of them their total area is 2ab.
The area of ACGE is the sum of the areas of the two square and two rectangles=a2+b2+2ab, therefore (a+b)2=a2+2ab+b2.