$$-5x+3y+(a+1)Z=1-2a; x-2y+z=2; -4x+(2-q)y+3z=3-29$$
$\left\{\begin{matrix}x=\frac{-Zaq-Zq-2aq+q+8Za+8Z+16a-104}{19-5q}\text{, }y=\frac{7Za+7Z+14a-167}{19-5q}\text{, }z=-\frac{192-12a-6Z-6Za+11q-2aq-Zq-Zaq}{19-5q}\text{, }&q\neq \frac{19}{5}\\x=\frac{2Z\left(a+1\right)+3z+4a-8}{7}\text{, }y=\frac{5z+Za+Z+2a-11}{7}\text{, }z\in \mathrm{R}\text{, }&q=\frac{19}{5}\text{ and }a=\frac{167-7Z}{7\left(Z+2\right)}\text{ and }Z\neq -2\end{matrix}\right.$