You can use a system of equations to answer this question.
1st: 2.20r + 3p = 700 is showing how to get the total cost.
2nd: r + p = 300 shows how many gallons were sold.
If we solve r + p = 300 for r, we can then solve the first equation in terms of r only.
r + p =300
p = 300 - r Use this in place of p in the first equation.
2.20r + 3p = 700
2.2r + 3(300 - r) = 700
2.2r + 900 - 3r = 700
-900 -900
2.2r - 3r = -200
-0.8r = -200
-0.8 -0.8
r = 250 gallons
There were 250 regular gallons sold and 50 premium gallons sold (300 - 250).