# Solving a simple system of equations through matrix operations

I'm having trouble with some basic linear algebra. My best searching doesn't exactly come up with the solution I'm looking for. My problem is as follows.

$$\begin{bmatrix} y_1 \\ y_2 \\ \end{bmatrix}=A \begin{bmatrix} x_1 \\ x_2 \\ \end{bmatrix} ,~~\text{and}~~ \begin{bmatrix} y_2 \\ y_3 \\ \end{bmatrix}=B \begin{bmatrix} x_3 \\ x_2 \\ \end{bmatrix}$$

where $$y_1$$ and $$x_2$$ are known. I see that I can rewrite the systems of equations as

$$\begin{bmatrix} x_1 \\ y_2 \\ \end{bmatrix}=A' \begin{bmatrix} y_1 \\ x_2 \\ \end{bmatrix} ~\text{where}~A'= \frac{1}{a_{11}} \begin{bmatrix} 1 & -a_{12}\\ b_{21} & \det{A}\\ \end{bmatrix} \tag{1}\label{eq1}$$ and similarly $$\begin{bmatrix} x_3 \\ y_3 \\ \end{bmatrix}=B' \begin{bmatrix} y_2 \\ x_2 \\ \end{bmatrix} ~\text{where}~B'= \frac{1}{b_{11}} \begin{bmatrix} 1 & -b_{12}\\ b_{21} & \det{B}\\ \end{bmatrix} \tag{2}\label{eq2}$$

This lets me solve by evaluating \ref{eq1} then plug $$y_2$$ into \ref{eq2}. However, I'd like to avoid the "plugging" in part. How can I arrive at that solution through matrix operations?

In other words, how do I get to something like this $$\begin{bmatrix} x_3 \\ y_3 \\ \end{bmatrix}=C \begin{bmatrix} y_1 \\ x_2 \\ \end{bmatrix}$$

Thanks!