2. Given non-zero real numbers $x, y, z$ form an arithmetic sequence, $x+1, -y, z$ and $x, y, z+2$ each form a geometric sequence, then the value of $y$ is ( ).
A. 8
B. 16
C. 12
D. 20
2. The system of equations $\left\{\begin{array}{l}2 y=x+z \\ y^{2}=z(x+1) \\ y^{2}=x(z+2)\end{array}\right.$

From (2)-(3) we get $z=2 x$, substituting into (1) gives $x=\frac{2}{3} y, \therefore z=\frac{4}{3} y$.
Substituting back into (2) yields the valid value of $y$ as $y=12$. Therefore, the answer is C.