Notice that 2/3 times 12 is...
(2/3)*12 = (2/3)*(12/1)
(2/3)*12 = (2*12)/(3*1)
(2/3)*12 = 24/3
(2/3)*12 = 8
So that explains the 8 on the right hand side.
For the blank, we'll multiply 2/3 by the 9y term like so
(2/3)*9y = ((2/3)*(9/1))y
(2/3)*9y = ((2*9)/(3*1))y
(2/3)*9y = (18/3)y
(2/3)*9y = 6y
This means 6y goes in the blank.
If your teacher only cares about the coefficient, aka number out front of the variable, then you'd just go for 6. That's my guess as to what your teacher wants. It seems to fit with the template you show and that would mean R goes in the second to last slot.