(a+b)² can also be written as (a+b) (a+b). When you expand this you get a²+2ab+b²
(a-b)² can also be written as (a-b) (a-b). When expanded this gives a²-2ab-b2
As you can see, this leads to different coefficients of the 'ab' values: for (a+B) ² its 2 for (a-b) ² its - 2