<s>[INST] Completing the square of $(x+a)(x+b)$ The problem is simple, to complete the square of $(x+a)(x+b)$. My calculations yield
$$\left(x+\frac{a+b}{2}\right)^2-\frac{(a+b)^2}{4}+ab,$$
But the textbook's answer is different ("problem 361", at the bottom of the page):
$$\left(x+\frac{a+b}{2}\right)^2-\frac{(a-b)^2}{4}$$
Did I do anything the wrong way? 
$$(x+a)(x+b)=x^2+xb+ax+ab=x^2+x(a+b)+ab=$$
$$=\left(x^2+2*\frac{a+b}{2}*x+\left(\frac{a+b}{2}\right)^2\right)-\left(\frac{a+b}{2}\right)^2+ab=$$
$$=\left(x+\frac{a+b}{2}\right)^2-\frac{(a+b)^2}{4}+ab$$
 [/INST] $\displaystyle \bf{(x+a)\cdot (x+b)} = x^2+(a+b)x+ab$
$\displaystyle  = \underbrace{x^2+(a+b)x+\left(\frac{a+b}{2}\right)^2}+\underbrace{ab-\left(\frac{a+b}{2}\right)^2} = \left[x+\frac{a+b}{2}\right]^2-\left(\frac{a-b}{2}\right)^2$
So your answer is Right.
</s>