Figure out slope by using:
(y2-y1)/(x2-x1)
Plug in values:
29.98-15.49/50-25
Simplify:
14.49/25 = 0.5796
Then, use this ratio for the 40 lbs bag. So, then:
40*0.5796 = 23.184
So, your price for the 40 lbs bag should be $23.18 because cents only go up to 2 decimal places (otherwise, it would be $23.184).