We seek the values of n—obtained by rolling a fair die, so that n ∈ {1,2,3,4,5,6}—for which the system of equations
$$x - ny + z = 6,$$
$$x + (n-2)\,y + (n+1)\,z = 8,$$
$$(n-1)\,y + z = 1$$
has a unique solution. A linear system is uniquely solvable exactly when the determinant of its coefficient matrix is nonzero. The coefficient matrix here is
$$D = \begin{vmatrix}
1 & -n & 1 \\
1 & n-2 & n+1 \\
0 & n-1 & 1
\end{vmatrix}.$$
Expanding this determinant along the first row gives
$$D = 1\cdot\begin{vmatrix}n-2 & n+1 \\ n-1 & 1\end{vmatrix}
\;-\;(-n)\cdot\begin{vmatrix}1 & n+1 \\ 0 & 1\end{vmatrix}
\;+\;1\cdot\begin{vmatrix}1 & n-2 \\ 0 & n-1\end{vmatrix}.$$
Each of the 2×2 determinants evaluates as follows:
First minor:
$$(n-2)\cdot1 - (n+1)(n-1) = n - 2 - (n^2 - 1) = -n^2 + n - 1;$$
Second minor:
$$1\cdot1 - (n+1)\cdot0 = 1;$$
Third minor:
$$1\cdot(n-1) - (n-2)\cdot0 = n - 1.$$
Substituting these into the expansion yields
$$D = 1\cdot(-n^2 + n - 1) + n\cdot1 + 1\cdot(n-1)
= -n^2 + n - 1 + n + n - 1
= -n^2 + 3n - 2.$$
Factoring shows
$$D = -\bigl(n^2 - 3n + 2\bigr) = -(n - 1)(n - 2).$$
Hence the determinant is nonzero precisely when n ≠ 1 and n ≠ 2. Since a fair die roll gives n ∈ {1,2,3,4,5,6}, the system has a unique solution exactly for n ∈ {3,4,5,6}, which comprises 4 out of the 6 equally likely outcomes. The probability is therefore 4/6, which we write as k/6, giving k = 4.
Finally, summing k and all possible values of n that yield a unique solution gives
$$k + 3 + 4 + 5 + 6 = 4 + 18 = 22.$$
Hence the correct answer is 22.