\(\left\{{}\begin{matrix}\left(a+1\right)^2x-\left(a+1\right)y=\left(a+1\right)^2\\x+\left(a+1\right)y=2\end{matrix}\right.\)
\(\Leftrightarrow\left\{{}\begin{matrix}\left(a^2+2a+2\right)x=a^2+2a+3\\x+\left(a+1\right)y=2\end{matrix}\right.\)
\(\Rightarrow x=\frac{a^2+2a+3}{a^2+2a+2}=1+\frac{1}{a^2+2a+2}\)
Để x nguyên \(\Rightarrow\frac{1}{a^2+2a+2}\) nguyên
Mà \(a^2+2a+2=\left(a+1\right)^2+1\ge1\Rightarrow0< \frac{1}{a^2+2a+2}\le1\)
\(\Rightarrow x\) nguyên khi và chỉ khi \(a=-1\)
Thay vào y thấy thỏa mãn, vậy với \(a=-1\) thì x;y nguyên