Answer:
red (w/discount) ... $18 per gallon
blue (w/discount) ... $20 per gallon
(3 n * 18) + (2 n * 20) ≤ 500
54 n + 40 n ≤ 500 ... 94 n ≤ 500 ... n ≤ 5 15/47
3 n = 15 gal red ... 2 n = 10 gal blue
1.6m questions
2.0m answers