Suppose $$a+b=c$$ which is equivalent to $$a+b-c=0$$
However, squaring both equations results in $$a^2+2ab+b^2=c^2$$ and $$a^2+2ab-2ac+b^2-2bc+c^2=0\\a^2+2ab+b^2=2ac+2bc-c^2$$ which are clearly different.
Which of the two is correct?
Suppose $$a+b=c$$ which is equivalent to $$a+b-c=0$$
However, squaring both equations results in $$a^2+2ab+b^2=c^2$$ and $$a^2+2ab-2ac+b^2-2bc+c^2=0\\a^2+2ab+b^2=2ac+2bc-c^2$$ which are clearly different.
Which of the two is correct?
Your last line:
$a^2+2ab+b^2= 2ac +2bc -c^2.$
Recall $a+b = c;$
RHS: $2ac +2bc-c^2 = 2c(a+b) -c^2 = 2c^2-c^2 =c^2.$
\begin{align} 2ac+2bc -c^2 = 2(a+b)c-c^2=2c^2-c^2=c^2 \end{align}
They are indeed equal.
if wer assume that $$c^2=2ac+2bc-c^2$$ then we get $$c^2=(a+b)c$$ or $$c(a+b-c)=0$$ so we get $c=0$ or $a+b-c=0$