His answer is wrong, but the process is right. you can take 2Q+Qx+Rx+R=x+4, and turn it into 2 equations.
factor together all of the X terms, and all of the non-x terms.
Qx + Rx = x
2Q + R = 4
What you end up with is Q+R=1, and 2Q+R=4
Then he put them into a matrix, and reduced it.
1 1 1
2...