a²+2ab+b²
(a + b)² = ?

No, not at all. I just explained the reasoning behind the result for the original poster so that they don't just know the answer but also understand why it is like that.
That is only true when a+b = ab, which is when b=(a)/(a-1) such as the following pairs: 2,2; 3,3/2; 4,4/3, etc.
Equations can be interesting. You can use them to prove that 2=1
1) Let a = b
2) multiple both sides by a to get: a^2 = ab
3) subtract b^2 from both sides to get a^2 - b^2 = ab - b^2)
4) factoring both sides gives us (a+b)(a-b) = b(a-b)
5) removing common factors gives us a+b=b
6) since a=b that can be transformed to b+b=b or 2b=1b
7) removing the common factor gives 2=1
Your task, should you choose to accept it, is to find which step or steps are the problem - and what is problematic about it/them.
when you remove common factors, you're dividing both sides by (a-b). But since a-b is 0, that's impossible because you can't divide by 0.
Most people take longer to find that.
Rule of thumb. When the math tells you something impossible then check the math.
If it still tells you something impossible after checking it multiple times then have somebody else check it (multiple somebodies multiple times)
If it still tells you something impossible then see what you need to do to make it plausible, and if you succeed then check to see if a trip to Stockholm is in your future.
I'm weak at math :(. Help me!!