You have two unknown quantities in this problem. They are the cost of a quart of oil and the cost of a gallon of gas. We can use variables to represent unknown quantities. Let o = the price of a quart of oil and g = the price of a gallon of gas. We can use the information in the problem to set up a system of equations. One equation will be:
4o + 40g = 126.80
The second equation would be:
6o + 52g = 166.28
Now, when given a system of equations we can solve them by one method known as the Elimination Method. In this method, we attempt to eliminate one of the variables by multiplying one or both of the equations by some constant, and then adding the equations together.
Let's choose to eliminate the variable o. Currently, one equation has a term of 4o, and the other equation has a term of 6o. What is the LCM (least common multiple) of 4 and 6? It is 12. We multiply 4 * 3 and 6 * 2 in order to obtain 12. Therefore, 3 and 2 are the two constants we can multiply the first and second equations by, respectively, in order to eliminate the variable o. We can now subtract the two equations from each other (or we could have multiplied either the top or bottom equation by a negative constant and then added them together).
3(4o + 40g = 126.80)
-2(6o + 52g = 166.28)
16g = 47.84
g = 2.99
The cost of a gallon of gas is $2.99. We can now plug this value of g into either of our two original equations to obtain the value of o. Let's choose the first equation.
4o + 40(2.99) = 126.80
4o + 119.6 = 126.80
4o = 7.20
o = 1.80
The cost of a quart of oil is $1.80