Let's determine those real numbers $x, y, z$ for which

$$
(x-y-3)^{2}+(y-z)^{2}+(x-z)^{2}=3
$$
Let's introduce the notations $a=x-z, b=y-z$. With these, (1) takes the following form:

$$
(a-b-3)^{2}+a^{2}+b^{2}=3
$$

Rearranging the left side and completing the square:

$$
2 a^{2}-2 a b+2 b^{2}-6 a+6 b+6=0 ;(2) 2\left(a-\frac{1}{2} b-\frac{3}{2}\right)^{2}+\frac{3}{2} b^{2}+3 b+\frac{3}{2}=0 ; 2\left(a-\frac{1}{2} b-\frac{3}{2}\right)^{2}+\frac{3}{2}(b+1)^{2}=0
$$

Neither term on the left can be negative, so equality can only hold if both are 0. This is satisfied if $b=-1$ and $a=\frac{1}{2} b+\frac{3}{2}=1$. This means for the original unknowns that $y=z-1$ and $x=z+1$. For such triples, each term on the left side of (1) is 1.

Therefore, the solutions to the equation are all triples where $x=z+1$ and $y=z-1$.

Remark. We could have solved (2) as a parameterized quadratic equation (e.g., with $a$ as the unknown and $b$ as the parameter) and determined from the sign of the discriminant for which parameter values there is a solution. This approach does not differ fundamentally from the method of the solution, since the quadratic formula is also obtained by completing the square.