If I am reading this correctly, step1 takes half the liquid in glass 1 and adds it to glass 2. That is, if glass 1 contains volume A and glass 2 volume B, after step 1, glass 1 will contain volume A/2 and glass B will contain volume B+ A/2. we can represent that by the matrix multiplication
\begin{pmatrix}\frac{1}{2} & 0 \\ \frac{1}{2} & 1 \end{pmatrix}\begin{pmatrix}A \\ B \end{pmatrix}= \begin{pmatrix}\frac{1}{2}A \\ \frac{1}{2}A+ B\end{pmatrix}
Step 2 takes half the liquid in glass 2 and adds it to glass 1. That is, if glass A contained volume A and glass 2 volume B, after step 2, glass 1 will contain volume A+ B/2 and glass 2 will contain volume B/2. We can represent that by the matrix multiplication
\begin{pmatrix}1 & \frac{1}{2} \\ 0 & \frac{1}{2}\end{pmatrix}\begin{pmatrix}A \\ B\end{pmatrix}= \begin{pmatrix}A+ \frac{1}{2}B \\ \frac{1}{2}B\end{pmatrix}.
Rather than deal with individual "steps" I would combine those into 1 round: If glass1 contains volume A and glass 2 contains volume B after a single round of 2 "steps" the glasses will contain:
\begin{pmatrix}1 & \frac{1}{2} \\ 0 & \frac{1}{2}\end{pmatrix}\begin{pmatrix}\frac{1}{2} & 0 \\ \frac{1}{2} & 1\end{pmatrix}\begin{pmatrix}A \\ B \end{pmatrix}=\begin{pmatrix} \frac{3}{4} & \frac{1}{2} \\ \frac{1}{4} & \frac{1}{2}\end{pmatrix}\begin{pmatrix}A \\ B\end{pmatrix}
For example, if A is "1 liter of alcohol" and B is "1 liter of water", after a single two step "round" the first glass will contain 3/4 liter of alcohol and 1/2 liter of water and the second glass will contain 1/4 liter of alcohol and 1/2 liter of water. (The amount of liquid in the two glasses does NOT stay the same. After step 1, there is more liquid in the second glass than the first so, in step 2, when we pour half of glass 2 into glass 1, we are putting more liquid back in than we took out.)
1000000000 "steps" will be 500000000 two step "rounds" so what you want to find is
\begin{pmatrix} \frac{3}{4} & \frac{1}{2} \\ \frac{1}{4} & \frac{1}{2}\end{pmatrix}^{500000000}\begin{pmatrix}A \\ B\end{pmatrix}
The simplest way to find a high power of a matrix is to "diagonalize". This matrix has 2 distinct eigenvalues (1 and 1/4) so two independent eigenvectors. If Y is the matrix having eigenvectors of matrix X as columns then X= YDY^{-1} where "D" is the diagonal matrix with the eigenvalues of X on the diagonal and then X^{500000000}= YD^{500000000}Y^{-1}.