Answer: Let's use the following variables to represent the unknown quantities in the problem:
x: the number of cupcakes purchased
y: the number of muffins purchased
From the problem statement, we can write two equations:
The total amount spent on cupcakes and muffins is $21.50:
2x + 1.25y = 21.50
The number of muffins purchased is one fewer than the number of cupcakes:
y = x - 1
These two equations form a system of equations that can be solved simultaneously to find the values of x and y.
Substituting equation 2 into equation 1, we get:
2x + 1.25(x - 1) = 21.50
Simplifying and solving for x:
2x + 1.25x - 1.25 = 21.50
3.25x = 22.75
x = 7
Now that we know x, we can use equation 2 to find y:
y = x - 1 = 7 - 1 = 6
Therefore, the customer purchased 7 cupcakes and 6 muffins, spending a total of $21.50.
Explanation: