2. In the domain of integers, solve the system of equations

$$
\begin{aligned}
& x(y+z+1)=y^{2}+z^{2}-5, \\
& y(z+x+1)=z^{2}+x^{2}-5, \\
& z(x+y+1)=x^{2}+y^{2}-5 .
\end{aligned}
$$
2. If we subtract the second equation from the first, we get the following transformations:

$$
\begin{aligned}
(xy + xz + x) - (yz + xy + y) & = (y^2 + z^2 - 5) - (z^2 + x^2 - 5), \\
(x - y)z + x - y & = (y - x)(y + x), \\
(x - y)(x + y + z + 1) & = 0.
\end{aligned}
$$

Similarly, we can derive the equalities

$$
(y - z)(x + y + z + 1) = 0 \quad \text{and} \quad (x - z)(x + y + z + 1) = 0.
$$

In all three derived equations, the factor \(x + y + z + 1\) appears. Therefore, we distinguish whether it is zero or not.

A. Let \(x + y + z + 1 = 0\). Then we can rewrite the original system of equations as follows:

$$
x \cdot (-x) = y^2 + z^2 - 5, \quad y \cdot (-y) = z^2 + x^2 - 5, \quad z \cdot (-z) = x^2 + y^2 - 5.
$$

We see that the entire system is equivalent to the single equation \(x^2 + y^2 + z^2 = 5\), which, due to the non-negativity of squares, has only such solutions in the set of integers that the triple \((x^2, y^2, z^2)\) is (up to permutation) the triple \((4, 1, 0)\), so \((x, y, z)\) is a permutation of one of the triples \((\pm 2, \pm 1, 0)\). The signs of the numbers \(x, y, z\) can easily be determined from the condition \(x + y + z + 1 = 0\): only the triple \((-2, 1, 0)\) and any of its permutations satisfy this condition. In case A, we thus obtain exactly six solutions to the system.

B. Let \(x + y + z + 1 \neq 0\). Then from the equations derived at the beginning of the solution, it follows that \(x = y = z\). In this case, the equations of the given system merge into the single equation \(x(2x + 1) = 2x^2 - 5\), which is satisfied only by \(x = -5\). In case B, we thus have the single solution \(x = y = z = -5\).

Let us add that in the first part of the solution, we could also rewrite the original system of equations in the form

$$
x^2 + y^2 + z^2 - 5 = x(x + y + z + 1) = y(x + y + z + 1) = z(x + y + z + 1).
$$

From this, we again obtain that either \(x + y + z + 1 = 0\) or \(x = y = z\).

Answer: The system has seven solutions: the triple \((-5, -5, -5)\), the triple \((-2, 1, 0)\), and any permutation of it.

For a complete solution, award 6 points. If the solver correctly subtracts the original equations but fails to factorize the result into a product form (1), award 1 point. For finding the factorizations (1) or the system (2), award 3 points. Add additional points based on the completeness of the subsequent discussion. A clear insight into solving the equation \(x^2 + y^2 + z^2 = 5\) in the set of integers, as well as the subsequent determination of signs in the equation \(\pm 2 \pm 1 + 0 + 1 = 0\), can be stated without explanation.