Four, (25 points) Given that $x, y, z$ are all non-negative real numbers, satisfying $x+y-z=1, x+2 y+3 z=4$, let $w=3 x +2 y+z$. Find the maximum and minimum values of $w$.


Solve the system $\left\{\begin{array}{l}x+y=1+z, \\ x+2 y=4-3 z .\end{array}\right.$ to get $\left\{\begin{array}{l}x=5 z-2, \\ y=3-4 z .\end{array}\right.$ From $\left\{\begin{array}{l}x=5 z-2 \geqslant 0, \\ y=3-4 z \geqslant 0\end{array} \Rightarrow \frac{2}{5} \leqslant z \leqslant \frac{3}{4}\right.$. Then $w=3 x+2 y+z=3(5 z-2)+2(3-4 z)+z=8 z$. Therefore, when $z=\frac{2}{5}$, $w$ has a minimum value of $\frac{16}{5}$, at this time, $x=0, y=\frac{7}{5}$. When $z=\frac{3}{4}$, $w$ has a maximum value of 6, at this time, $x=\frac{7}{4}, y=0$.