OK I have an assignment due tomorrow and I'm pretty much screwed. This is the first problem I have. The solution is given, I just can't understand how to get said solution. Usually I just take a look at an example and don't have problems with the rest of the questions, but I can't figure this out.

(a+b)^2 = (a+b)(a+b)

=a(a+b)+b(a+b) = a^2 + ab + ba + b^2

(a+b)^2= a^2 + 2ab + b^2

The first line is obvious. However, I am completely lost on where to go from there. Could someone please try to explain to me the steps I need to take to solve this problem