The capacity of the shelter is a constant. It is 80 people × 14 days.
That is an inverse relation: the product of the number of people and the number of days will be always the same.
As the number of people decreases the number of days that the food lasts increases, in a proportion such that the product of the days and the number of people is the same.
Thus, for 32 people the number of days the food lasts is x, such that:
Let be the amount (gal) of the 40% slime solution you end up using. You want to end up with 120 gal of the 50% solution, so that you would use gal of the 70% solution.
You want the final solution to consist of 50% slime, or 60 gal of slime. Each gal of the 40% solution contributes 0.4 gal of slime, while each gal of the 70% solution contributes 0.7 gal of slime. This means