In general, if you are given a system with some a and b like
$x + y + z = a $
$x + 2z= b$
$x + ay + z=b$
And asked to find the values a and b such that the system has no solution, infinitely many solutions, or a one solution what would be the constraints when row reducing the augmented matrix (ie you can't divide by something, etc.). For the problem above I did row operations on the augmented until I reached here
($ \begin{matrix} 1 & 0 & 1 & b \\ 0 & 1 & -2 & a-b \\ 0 & 0 & 2a & ab-a^2\\\end{matrix}$)
Do the row operation to the augmented matrix: $$ \begin{bmatrix} 1 & 1 & 1 & a \\ 1 & 0 & 2 & b \\ 1 & a & 1 & b \\ \end{bmatrix} \sim \begin{bmatrix} 1 & 1 & 1 & a \\ 0 & -1 & 1 & b-a \\ 0 & a-1 & 0 & b-a \end{bmatrix} \sim \begin{bmatrix} 1 & 0 & 2 & b \\ 0 & -1 & 1 & b-a \\ 0 & 0 & a-1 & a(b-a) \end{bmatrix} $$
From here, assuming $a-1\neq 0$ you can carry on row operations to get
$$ \begin{bmatrix} 1 & 0 & 0 & b-\frac{2a}{a-1} (b-a)\\ 0 & -1 & 0 & -\frac{1}{a-1}(b-a) \\ 0 & 0 & 1 & \frac{a}{a-1} (b-a) \end{bmatrix} $$
If $a=1$ then you end up with
$$ \begin{bmatrix} 1 & 0 & 2 & b\\ 0 & 1 & -1 & 1-b \\ 0 & 0 & 0 & b-1 \end{bmatrix} $$
So no solution.