Artificial intelligent assistant

Ax=b with parametric b vector. A=$\begin{pmatrix} 1 & 3 & 1\\\ 0 & 1 & 1\\\ 2 & -2 & -6 \end{pmatrix}$ B=$\begin{pmatrix} 8\\\ k\\\ 8 \end{pmatrix}$ Discuss the solutions of the system S: Ax=B. * * * I have used the Rouche Capelli theorem wich implicate that S have solutions only if: $rkA\leq$rk$A'$ where A'= A|B. Well, $rkA$=2 still. But $rkA'=2$ only if $\begin{vmatrix} 1 & 3 & 8\\\ 0 & 1 & k\\\ 2 & -2 & 8 \end{vmatrix}$=$0$ This happens for $k=1$ wich is ok with my textbook but... ...if $k=1$ I can also calculate the other possible determinant: $\begin{vmatrix} 1 & 1 & 8\\\ 0 & 1 & k\\\ 2 & -6 & 8 \end{vmatrix}$ wich for $k=1$ is not equal to $0$ $\Rightarrow $ for $k=1$, $rkA'$=$0$ My textbook still saying that for $k=1$, S have one solution. Why i'm wrong? My solution will be to create a system made of the possible determinant equalized to 0 (in this case 2 deterimnants).

Use row reduction for the augmented matrix: \begin{align} \begin{bmatrix}1&3&1&8\\\0&1&1&k\\\2&-2&-6&8\end{bmatrix}\rightsquigarrow\begin{bmatrix}1&3&1&8\\\0&1&1&k\\\0&-8&-8&-8\end{bmatrix}\rightsquigarrow \begin{bmatrix}1&3&1&8\\\0&1&1&k\\\0&0&0&(k-1)8\end{bmatrix}\end{align} Thus $\operatorname{rank}A'=2$ if and only if $k=1$.

Moreover, the solutions are an affine subspace of dimension $1$: if we continue row reduction to obtain the reduced row echelon form, dropping the last (zero) row,we have $$\begin{bmatrix}1&3&1&8\\\0&1&1&1\end{bmatrix}\rightsquigarrow\begin{bmatrix}1&0&-2&5\\\0&1&1&1\end{bmatrix}$$ whence the solutions: \begin{align} \begin{cases}x&=2z-5,\\\ y&=-z-1,\end{cases}\quad\text{or, in vector form:}\quad \begin{bmatrix}x\\\y\\\z\end{bmatrix}=z\begin{bmatrix}2\\\\-1\\\1\end{bmatrix}-\begin{bmatrix}5\\\1\\\0\end{bmatrix}. \end{align}

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 2cf93a11b0c5333c1c2468b05c055baf