In the box containing the 2 plain pencils and 2 pens, there would be a 50% chance of getting a pen. In the other box containing 7 color pencils and 3 crayons there would be a 30% chance of getting a crayon.
So the equation is 2x + y = 9 you want to solve the equation so that y is on one side. in order to do this you need to subtract 2x from BOTH sides to get y by itself. after, you should get y = 9 - 2x