This is a self-answered question. I post it here since it wasn't trivial for me.
Consider the equality $$ 2\frac{x^4-4 x^3+2 x^2 (y^2+2)-4 x y^2+y^2 (y^2+8)}{(x^2-2 x+y^2)^2}=2+\frac{4y^2}{(1-x)^2}, \tag{1} $$ where $x,y$ are real numbers.
Mathematica claims that if this equality holds, then if $y \neq 0$, then $$ x\in \{\pm\sqrt{2-y^2}, 2 \pm \sqrt{2-y^2}\}. $$
Is there any chance we could verify this "by hand"?
(If $y=0$, then the equality holds for any $x \neq 2$.)
The motivation for considering this equality comes from this problem.