12.22 Find all integer solutions to the equation $\frac{x+y}{x^{2}-x y+y^{2}}=\frac{3}{7}$.
(12th All-Russian Mathematical Olympiad, 1986)
[Solution 1] From the original equation, we have
$$
7(x+y)=3\left(x^{2}-x y+y^{2}\right) .
$$

Let $x+y=p, x-y=q$, then
$$
x=\frac{p+q}{2}, \quad y=\frac{p-q}{2}, \quad x y=\frac{p^{2}-q^{2}}{4} .
$$

Substituting into (1) yields
$$
28 p=3\left(p^{2}+3 q^{2}\right) .
$$

Thus, $p \geqslant 0$, and $p$ is a multiple of 3.
Let $p=3 k\left(k \in \overline{Z^{-}}\right)$, substituting into (2) gives
$$
28 k=3\left(3 k^{2}+q^{2}\right) \text {. }
$$

Thus, $k \geqslant 0$, and $k$ is a multiple of 3.
Let $k=3 m\left(m \in \overline{Z^{-}}\right)$, substituting into (3) gives
$$
\begin{array}{c}
28 m=27 m^{2}+q^{2}, \\
m(28-27 m)=q^{2} \geqslant 0 .
\end{array}
$$

Thus, $\quad 28-27 m>0$, which gives
$$
0 \leqslant m<\frac{28}{27}
$$

That is, $m=0$ or 1.
When $m=0$, $k=0, p=0, q=0$, thus $x=y=0$, but $x=0, y=0$ does not satisfy the equation.
When $m=1$, $k=3, \quad p=9, \quad q= \pm 1$, thus the equation has two solutions
$$
\left\{\begin{array} { l } 
{ x = 5 , } \\
{ y = 4 , }
\end{array} \quad \left\{\begin{array}{l}
x=4 \\
y=5 .
\end{array}\right.\right.
$$
[Solution 2] The given equation can be transformed into
$$
\begin{array}{c}
3 x^{2}-3 x y+3 y^{2}-7 x-7 y=0, \\
3 x^{2}-(3 y+7) x+3 y^{2}-7 y=0 .
\end{array}
$$

This is a quadratic equation in $x$, and the necessary condition for it to have integer solutions is
$$
\begin{array}{c}
\Delta=(3 y+7)^{2}-12\left(3 y^{2}-7 y\right) \geqslant 0, \\
27 y^{2}-126 y-49 \leqslant 0, \\
\frac{21-14 \sqrt{3}}{9} \leqslant y \leqslant \frac{21+14 \sqrt{3}}{9} .
\end{array}
$$

Thus, the integers $y$ that satisfy this inequality are only
$$
y=0,1,2,3,4,5 \text {. }
$$

Upon verification: when $y=0,1,2,3$, $x$ is not an integer.
The integer solutions sought are
$$
\left\{\begin{array} { l } 
{ x = 5 } \\
{ y = 4 }
\end{array} \quad \left\{\begin{array}{l}
x=4 \\
y=5
\end{array}\right.\right.
$$