ANSWER

EXPLANATION
The given polynomials are:

and

We want to subtract these two polynomials.

Expand the right hand side to obtain:

Group the similar terms:

Combine the similar terms to get:

miles per gallon (x) = d/g
x = 476/14 = x = 34 miles per gallon
so d/x = g
578/34 = 17 gallons are needed
we use divsion, 10 divided by 5 is 2, everyone get 2 yumy cupcakes.