# System of three linear equations with unknown constant

I have a linear system with three equations:

\begin{align} x + y + z &= 3a\\ x + 2y + (a+2)z &= a\\ x - (a+1)y - z &= 0 \end{align}

I want to find values for a where the system is inconsistent in addition to the values of $$x, y, z$$ and $$a$$ for where the system is consistent.

How should one approach a problem like this?

With $$z=x-(a+1)y$$ we get $$2x+y-(a+1)y=3a$$ and $$2x-ay=3a$$ eliminating $$x$$ we obtain $$-\frac{3a(a+3)}{2}y=-\frac{3a(a+3)}{2}$$ Now you can do the rest!