In this problem we have two variables, so we need two equation to solve the system.
The first equation comes from the gasoline he puts in his truck so: (R mean the regular gasoline, and P means the premium gasoline)
And the secon equation comes from the value of a individual gallon:
Now to find the value of the regular gasoline we can replace the second equation into the first equation:
Now with the value of R we can rplace that into the second equation: