Answer:
12 cupcakes were sold
11 brownies were sold
Explanation:
Let c = number of cupcakes sold
Let b = number of brownies sold
Total number of items sold = 23
⇒ b + c = 23
cupcake = $1.50 each
brownie = $1.25 each
Total money made = $31.75
⇒ 1.5c + 1.25b = 31.75
Rewrite b + c = 23 to make b the subject, substitute into 1.5c + 1.25b = 31.75 and solve for c:
⇒ b = 23 - c
⇒ 1.5c + 1.25(23 - c) = 31.75
⇒ 1.5c + 28.75 - 1.25c = 31.75
⇒ 0.25c + 28.75 = 31.75
⇒ 0.25c = 3
⇒ c = 12
So 12 cupcakes were sold
Substitute found value for c into b + c = 23 and solve for b:
⇒ b + 12 = 23
⇒ b = 11
So 11 brownies were sold