\(x^2+2x+y^2+2y=\left(x+2\right)\left(y+2\right)\)
\(\Leftrightarrow x\left(x+2\right)+y\left(y+2\right)=\left(x+2\right)\left(y+2\right)\)
\(\Leftrightarrow\frac{x}{y+2}+\frac{y}{x+2}=1\)
Đặt \(\left\{{}\begin{matrix}\frac{x}{y+2}=a\\\frac{y}{x+2}=b\end{matrix}\right.\) ta được hệ:
\(\left\{{}\begin{matrix}a+b=1\\a^2+b^2=1\end{matrix}\right.\) \(\Leftrightarrow\left\{{}\begin{matrix}a+b=1\\\left(a+b\right)^2-2ab=1\end{matrix}\right.\) \(\Leftrightarrow\left\{{}\begin{matrix}a+b=1\\ab=0\end{matrix}\right.\)
\(\Rightarrow\left(a;b\right)=\left(1;0\right);\left(0;1\right)\Rightarrow\left(x;y\right)=\left(2;0\right);\left(0;2\right)\)