Solution (source code)

= Solution

The <adjugate matrix> formula gives
$$
A^{-1}=\frac12\begin{pmatrix}1&1&-2\\-7&1&4\\5&-1&-2\end{pmatrix}.
$$
Multiplication by the right-side column yields
$$
r=A^{-1}d=\frac12\begin{pmatrix}1+2-6\\-7+2+12\\5-2-6\end{pmatrix},
\qquad\boxed{(x,y,z)=\left(-\frac32,\frac72,-\frac32\right).}
$$
Multiplying the inverse by $A$ checks the <identity matrix>, and substitution of this solution into the three original rows gives $1,2,3$ respectively.