a^2 - 2a + 1 /2 from a ^2 + 2a - 1 / 2
I'm guessing
$\displaystyle a^2-2a+\frac{1}{2} - (a^2+2a-\frac{1}{2})$
You put all the $\displaystyle a^2$s together, all the parts with just $\displaystyle a$ together, and then all numbers with no $\displaystyle a$ together.
So you have
$\displaystyle a^2-a^2$= 0
$\displaystyle -2a - (2a)$ = -4a
$\displaystyle \frac{1}{2} - (-\frac{1}{2})$= 1
altogether giving
$\displaystyle -4a + 1$