You're given the system of linear equations described by
$$\mathbf{A}\mathbf{x}=\mathbf{b}\iff\begin{bmatrix}1&2&-3\\3&-1&5\\4&1&a^2-14\end{bmatrix}\begin{bmatrix}x\\y\\z\end{bmatrix}=\begin{bmatrix}4\\2\\a+2\end{bmatrix}$$
Your elimination procedure for writing $$\left[\begin{array}{ccc|c}1&2&-3&4\\3&-1&5&2\\4&1&a^2-14&a+2\end{array}\right]\stackrel{\text{elim}}{\implies}\left[\begin{array}{ccc|c}1&2&-3&4\\0&1&-2&\frac{10}{7}\\0&0&a^2-16&a-4\end{array}\right]$$
is correct.
Let's first assume $a=4$. Under this assumption, the last row is composed entirely of zeros and the matrix $\mathbf{A}$ is of rank $2$ (only two pivots in the $(1,1)$ and $(2,2)$ positions). This means the dimension of the nullspace (the set of vectors $\mathbf{x}$ such that $\mathbf{A}\mathbf{x}=\mathbf{0}$) of $\mathbf{A}$ is $1$, which means that, whether or not $\mathbf{A}\mathbf{x}=\mathbf{b}$ has a "special" solution that is a linear combination of the columns of $\mathbf{A}$, there will be a host (read: infinite number) of solutions determined by the vector in the basis of the nullspace.
With $a=4$, write the augmented matrix in RREF to obtain
$$\left[\begin{array}{ccc|c}1&0&1&0\\0&1&-2&0\\0&0&0&0\end{array}\right]$$
Because you know the basis of the nullspace contains one vector, you know that you have one free variable; that is, you can fix any of $x$, $y$, or $z$ and uniquely determine the value of the other two. Suppose $z=1$; then $x=-1$ and $y=2$. Therefore $\mathbf{x}=\begin{bmatrix}-1\\2\\1\end{bmatrix}$ is in the nullspace of $\mathbf{A}$, and furthermore any scalar multiple of this vector is also in the nullspace. This alone is enough to conclude that there is an infinite number of solutions to $\mathbf{A}\mathbf{x}=\mathbf{b}$ precisely when $a=4$.
Now suppose $a=-4$. The augmented matrix becomes
$$\left[\begin{array}{ccc|c}1&2&-3&4\\0&1&-2&\frac{10}{7}\\0&0&0&-8\end{array}\right]$$
The last row is problematic. There is no $\mathbf{x}$ that satisfies this equation.
Now assume $a\neq\pm4$. You correctly note that for this case, you can multiply the last row by $\frac{1}{a-4}$ to yield
$$\left[\begin{array}{ccc|c}1&2&-3&4\\0&1&-2&\frac{10}{7}\\0&0&a+4&1\\\end{array}\right]$$
Because there are three pivots (all sitting along the diagonal), the nullspace has dimension $0$ (so it only contains the zero vector) which means that if there is a solution to $\mathbf{A}\mathbf{x}=\mathbf{b}$, then $\mathbf{b}$ is exactly a linear combination of the columns of $\mathbf{A}$. The last row tells you when this happens. Solving, you get
$$\mathbf{x}=\begin{bmatrix}4-2\left(\frac{10}{7}+\frac{2}{a+4}\right)+\frac{3}{a+4}\\\frac{10}{7}+\frac{2}{a+4}\\\frac{1}{a+4}\end{bmatrix}=\begin{bmatrix}\frac{8}{7}-\frac{1}{a+4}\\\frac{10}{7}+\frac{2}{a+4}\\\frac{1}{a+4}\end{bmatrix}$$
To summarize:
There are infinitely many solutions when $a=4$.
There are no solutions when $a=-4$.
There is exactly one solution otherwise.
To answer your question about the "legal" move - that's absolutely fine so long as $a\neq4$. The problem with your work crops up just below that part: in the case of $a\neq\pm4$, when considering the last row you do not have the equation $a+4=1$, but rather $(a+4)z=1$.
We have
$$ a_1−a_2−b_1+b_2=x $$
$$ a_1+a_2=n_1 $$
$$ b_1+b_2=n_2 $$
$$ a_1+b_1=n_1 $$
$$ a_2+b_2=n_2 $$
Noting that
$$a_2=n_1-a_1=b_1$$
and letting $a_2=k$, we see that we have
$$(a_1,a_2,b_1,b_2,x)=(n_1-k,k,k,n_2-k,n_1+n_2-4k)\tag1$$
for some $k$.
For 1., 2. :
The system has a solution in non-negative integers if and only if we have
$$n_1-k\ge 0\quad\text{and}\quad k\ge 0\quad\text{and}\quad n_2-k\ge 0\quad\text{and}\quad n_1+n_2-4k\ge 0\quad\text{where}\quad k\in\mathbb Z,$$
i.e.
$$0\le k\le \min\left\{n_1,n_2,\left\lfloor\frac{n_1+n_2}{4}\right\rfloor\right\}\quad\text{where}\quad k\in\mathbb Z$$
For 3., 4. :
From 1., 2.,
$$x_{\text{min}}=n_1+n_2-4\min\left\{n_1,n_2,\left\lfloor\frac{n_1+n_2}{4}\right\rfloor\right\}$$
For 5. :
Since $k=n_1/2$, from $(1)$,
$$(a_1,a_2,b_1,b_2,x)=\left(\frac{n_1}{2},\frac{n_1}{2},\frac{n_1}{2},\frac{n_1}{2},0\right)$$
is a solution.
Best Answer
We want to know when $\dfrac{2a+b}{a-2} = 2 + \dfrac{b+4}{a-2}$ is an integer.
This is equivalent to finding when $\dfrac{b+4}{a-2}$ is an integer.
Hence we need to know when $a-2$ is a factor of $b+4$.
Since the question ask for values of $b$ where there are exactly $4$ values of $a$ satisfying the condition, we need to find when $b+4$ has exactly $4$ factors.
Since both positive and negative factors are included, only primes can satisfy this condition (as you have observed). That is, we need to find values of $b$ such that $b+4$ is prime (but not $b$ itself).