The linear equation has the form P=aQ+b where P is the profit in credits and Q is the quantity or number of barrels of Glug. The slope “a” is (9000-3000)/(50-20)=6000/30=200 credits per barrel.
We can write P-3000=200(Q-20), P=200Q-4000+3000=200Q-1000. So the profit P(Q)=200Q-1000.
When Q=80 barrels, P(80)=200×80-1000=15000 credits.