2. Determine all integer solutions \(a\) and \(b\) for which

\[
7a + 14b = 5a^2 + 5ab + 5b^2
\]
Solution. We can write the equation as a quadratic equation in $b$, namely

$$
5 b^{2}+(5 a-14) b+5 a^{2}-7 a=0
$$

Its solutions are

$$
b_{1 / 2}=\frac{14-5 a \pm \sqrt{(5 a-14)^{2}-20\left(5 a^{2}-7 a\right)}}{10}=\frac{14-5 a \pm \sqrt{196-75 a^{2}}}{10}
$$

For the solutions to be real, it is sufficient that $196-75 a^{2} \geq 0$, i.e., $a^{2} \leq \frac{196}{75}$. Thus,

$$
-\frac{14}{5 \sqrt{3}} \leq a \leq \frac{14}{5 \sqrt{3}}
$$

However, $a$ is an integer, so possible values for $a$ are $a \in\{-1,0,1\}$. By substituting $a$ into $b_{1 / 2}$, we get

$$
\begin{array}{lll}
1^{\circ} a=-1 & \Rightarrow & b_{1}=3, b_{2} \notin \mathbb{Z} \\
2^{\circ} a=0 & \Rightarrow & b_{1} \notin \mathbb{Z}, b_{2}=0 \\
3^{\circ} a=1 & \Rightarrow & b_{1}=2, b_{2} \notin \mathbb{Z}
\end{array}
$$

Thus, the desired solutions are $(a, b) \in\{(-1,3),(0,0),(1,2)\}$.