Yes it is a function the x’values do not repeat
If the 5 scores have a mean of 8, then their total sum would be 8*5 = 40
Now if one score if added (let's call this score x), there are 6 scores and the mean changes to 9, thus:
(40 + x)/6 = 9
40 + x = 54
x = 14
Make 2 equations one for the price and one for quantity. so first set x = AA and y= AAA. for price 37= 1x+.75y. now for the quantity we have x+y=42. Now we can solve by subtracting the equation for price from the equation for quantity and we get .25y =5. solving this we get y= 20. Now we plug that value back in and solve for x. 22 double A's and 20 triple A's.
78 gallons is the same as 312 quarts