If you follow along with the “row reduction” steps, then the original system of three equations is simplified into this form:
The first three columns are the coefficients of x_1, x_2, and x_3. The fourth column are the ‘y’ values.
So, what code in that cell does is, starting from the bottom row of the reduced matrix, starts doing substitutions to solve for each of the values.
The bottom row equates to:
1 * x_3 = -2.
So you already have x_3 = -2. Technically, the code there should be x_3 = A_ref([2,3], rather than hard-coding the value -2.
At this point, it just becomes an algebra exercise:
In the 2nd row: (5*x2 - 7*x3 = 34), you substitute in x_3 and solve for x_2.
Then in the top row, you substitute in x_3 and x_2, and solve for x_1.