Solve the system of equations:

$$
\begin{aligned}
x+y-z & =4 \\
x^{2}+y^{2}-z^{2} & =12 \\
x^{3}+y^{3}-z^{3} & =34 .
\end{aligned}
$$
$$
\begin{aligned}
x+y-z & =4 \\
x^{2}+y^{2}-z^{2} & =12 \\
x^{3}+y^{3}-z^{3} & =34
\end{aligned}
$$

We will use the following easily verifiable (and sometimes useful) relationships:

$$
\begin{aligned}
& x^{2}+y^{2}=(x+y)^{2}-2 x y \\
& x^{3}+y^{3}=(x+y)^{3}-3 x y(x+y)
\end{aligned}
$$

From (1), we express $(x+y)$, and substitute (4) and (5) into (2) and (3):

$$
\begin{aligned}
(z+4)^{2}-2 x y-z^{2} & =12 \\
(z+4)^{3}-3 x y(z+4)-z^{3} & =34
\end{aligned}
$$

From (6), we have $x y=4 z+2$, substituting this into (7) and rearranging the resulting equation, we get $6=6 z$, hence $z=1$. Then $x y=4 z+2=6$ and from (1) we have $x+y=z+4=5$, so $x$ and $y$ are the roots of the equation $u^{2}-5 u+6=0$: $x=2, y=3$ or $x=3, y=2$.

Thus, the solutions to the system of equations can only be

$$
x=2, y=3, z=1, \quad \text { and } \quad x=3, y=2, z=1
$$

We can verify that these are indeed solutions by substituting them back into the original equations.