6. Given that $x, y, z$ are three non-negative real numbers, satisfying
$$
3 x+2 y+z=5, x+y-z=2 \text{. }
$$

If $S=2 x+y-z$, then the sum of the maximum and minimum values of $S$ is ( ).
(A) 5
(B) 6
(C) 7
(D) 8
6. A.

From $\left\{\begin{array}{l}3 x+2 y+z=5 \\ x+y-z=2, \\ 2 x+y-z=S,\end{array}\right.$ we get $\left\{\begin{array}{l}x=S-2 \geqslant 0, \\ y=5-\frac{4}{3} S \geqslant 0, \\ z=1-\frac{1}{3} S \geqslant 0 .\end{array}\right.$ Therefore, $2 \leqslant S \leqslant 3$.