I am currently doing some questions for loci of complex numbers and this question stumped me.

I did some algebra, and got to here:

$$128(x^2 - 2x) + 144y^2 = 1024.$$

However, the answer scheme then simplifies this to:

$$128(x-1)^2 + 144y^2 = 1152.$$

How did this happen? Shouldn't the $$1024$$ become $$1025$$ instead (from the $$(x-1)^2$$ )?

\begin{aligned} 128(x^2 - 2x) + 144y^2 & = 1024 \\ 128(x^2 - 2x + 1 - 1) + 144y^2 & = 1024 \\ 128(x^2 - 2x + 1) \color{red}{- 128} + 144y^2 & = 1024 \\ 128(x - 1)^2 + 144y^2 & = 1024 \color{red}{+ 128} \\ 128(x - 1)^2 + 144y^2 & = 1152 \end{aligned}\tag{1}\label{eq1A}
No; don't forget about the factor $$128$$ before the term $$(x-1)^2$$. You get $$128(x-1)^2=128(x^2-2x+1)=128(x^2-2x)+128.$$