Answer:
3x+4y
Explanation:
If you buy 2 M&Ms, you would get $6. Plugging in 2 for x would indeed give us 6, which makes sense.
If you buy 2 KitKats, you would get $8. Plugging in 2 for y would indeed give us 8, which makes sense.
Therefore, we can plug in x and y for the unknowns and add them together to find the total amount spent on both candies.