How would I solve $x^2-4x=y^2-4y$ without knowing the answer beforehand?

\begin{align} x^2 - 4x &= y^2 - 4y \\ x^2 - y^2 &= 4x - 4y \\ (x-y)(x+y) &= 4(x-y) \\ x+y &= 4\end{align} where dividing by $x-y$ is allowed since $x \neq y$.


As an alternative, the solution that struck me first was completing the square in both $x$ and $y$. This is common when dealing with quadratics, especially once there are no $xy$ cross-terms. $$ x^2 - 4x = y^2 - 4y $$ $$ x^2 - 4x + 4 = y^2 - 4y + 4 $$ $$ (x-2)^2 = (y-2)^2 $$ This means that either $x-2 = y-2$ or $x-2 = -(y-2)$, which means either $x = y$ or $x+y = 4$, as desired.


Let $c$ be the common value of $x^2-4x$ and $y^2-4y$. Then $x$ and $y$ are both roots of the polynomial $t^2-4t-c$. Since we are assuming $x$ and $y$ are distinct, they are all of the roots, so $t^2-4t-c$ factors as $(t-x)(t-y)$. Since $(t-x)(t-y)$ expands to $t^2-(x+y)t+xy$, comparing the coefficients of $t$ gives $x+y=4$.

(Conversely, if $x+y=4$, then since $x$ and $y$ are both roots of $(t-x)(t-y)=t^2-(x+y)t+xy=t^2-4t+xy$, $x^2-4x$ and $y^2-4y$ are both equal to $-xy$.)