Let $x, y \in \mathbb R$ such that $x^2+y^2=2x-2y+2$. Find the largest possible value of $x^2+y^2$ 
Let $x, y \in \mathbb R$ s. t . $x^2+y^2=2x-2y+2$.  Find the largest possible value of $x^2+y^2-\sqrt{32}$

I know this is a duplicate of another question, but that question has solutions involving calculus and geometry, while I want a solution relying on algebra and basic inequalities only to solve this problem.

Let $ z=x+iy$. Then, we have $ |z-(1+i)| =2$ from $x^2+y^2=2x-2y+2$, and
$$|z|= |z-(1+i)+(1+i )| \le | z-(1+i)|+ |1+i |= 2+ \sqrt 2=|z|_{max}$$
Thus, the largest possible value is
$$x^2+y^2= |z|_{max}^2 = (2+\sqrt 2)^2=6+4\sqrt2$$
