2B. Solve the system of equations in $\mathbb{R}$: $x+y=z, x^{2}+y^{2}=z, x^{3}+y^{3}=z$.
Solution. By squaring and cubing the first equation, we get:

$$
\begin{aligned}
& x^{2}+y^{2}+2 x y=z^{2}, \quad z+2 x y=z^{2}, \quad x y=\frac{1}{2}\left(z^{2}-z\right) \text { and } \\
& x^{3}+y^{3}+3 x y(x+y)=z^{3}, \quad z+\frac{3}{2}\left(z^{2}-z\right) z=z^{3}, \quad z(z-1)(z-2)=0 .
\end{aligned}
$$

If $z=0$, then $x+y=0, x y=0$, so the solution is $(0,0,0)$.

If $z=1$, then $x+y=1, x y=0$, so the solutions are $(0,1,1)$ and $(1,0,1)$.

If $z=2$, then $x+y=2, x y=1$, so the solution is $(1,1,2)$.

Therefore, the solutions to the system are: $(0,0,0),(0,1,1),(1,0,1)$ and $(1,1,2)$.