We obtain the answer by using the squaring rule, \displaystyle (a+b)^2=a^2+2ab+b^2, on the quadratic term and expanding the other bracketed terms
Vorlage:Displayed math