Let's look at your original three equations.
$$x+2y+z=2$$
$$3x+8y+z=12$$
$$4y+z=2$$
Now let's multiply by $\frac{2}{5}$, $\frac{1}{5}$, and $\frac{-3}{5}$ respectively. We get
$$\frac{2x}{5}+\frac{4y}{5}+\frac{2z}{5}=\frac{4}{5}$$
$$\frac{3x}{5}+\frac{8y}{5}+\frac{z}{5}=\frac{12}{5}$$
$$\frac{-12y}{5}+\frac{-3z}{5}=\frac{-6}{5}$$
Now add the three equations together. We get
$$x + 0y + 0z = 2$$
or
$$x=2$$
Now multiply the same three equations by $\frac{-3}{10}$, $\frac{1}{10}$, and $\frac{1}{5}$ respectively. We get
$$\frac{-3x}{10}+\frac{-6y}{10}+\frac{-3z}{10}=\frac{-6}{10}$$
$$\frac{3x}{10}+\frac{8y}{10}+\frac{z}{10}=\frac{12}{10}$$
$$\frac{4y}{5}+\frac{z}{5}=\frac{2}{5}$$
Summing
$$0x + y + 0z = \frac{10}{10}$$
or
$$y = 1$$
Now multiply the same three equations by $\frac{6}{5}$, $\frac{-2}{5}$, and $\frac{1}{5}$ respectively. We get
$$\frac{6x}{5}+\frac{12y}{5}+\frac{6z}{5}=\frac{12}{5}$$
$$\frac{-6x}{5}+\frac{-16y}{5}+\frac{-2z}{5}=\frac{-24}{5}$$
$$\frac{4y}{5}+\frac{z}{5}=\frac{2}{5}$$
Summing
$$0x + 0y + z = \frac{-10}{5}$$
or
$$z = -2$$
And if you look at the numbers by which we multiplied, they are from
$$\begin{pmatrix}
2/5 & 1/5 & -3/5\\
-3/10 & 1/10 & 1/5\\
6/5 & -2/5 & 1/5
\end{pmatrix} = A^{-1}$$
We essentially did the matrix multiplication of $A \cdot A^{-1}$ to get $I$ manually when we could have just done
$$\begin{pmatrix}
x\\
y\\
z
\end{pmatrix} = \begin{pmatrix}
2/5 & 1/5 & -3/5\\
-3/10 & 1/10 & 1/5\\
6/5 & -2/5 & 1/5
\end{pmatrix}\begin{pmatrix}
2\\
12\\
2
\end{pmatrix}=\begin{pmatrix}
2\\
1\\
-2
\end{pmatrix}$$
and gotten the same answer. $A^{-1}$ is essentially the numbers by which we multiply the equations so we can add them together and get the solutions. Solving for the inverse is determining those numbers. Of course, if you're working with the equations, it would be easier to substitute in than to come up with all nine numbers. The convenient thing here is that we don't have to multiply $A\cdot A^{-1}$, as we already know the result. We can just do the right side multiplication.