Final answer:
To solve the problem, set up a system of linear equations using the given information and then solve for the variables.
Step-by-step explanation:
To solve this problem, we can set up a system of linear equations representing the two scenarios.
Let p represent the cost of 1 bag of peanuts in dollars and w represent the cost of 1 bottle of water in dollars.
From the first scenario, we have the equation:
5p + 2w = 36
From the second scenario, we have the equation:
3p + 2w = 24
We can now solve this system of equations to find the values of p and w.