Answer:
c = 10; d = 30
Explanation:
As one commenter implies, we will need a system of equations to solve for c, the number of cakes sold, and d, the number of dozens sold.
We know that the sum of the revenues (price * quantity) earned from the cakes and doughnuts equals the total revenue:
(price of cake * quantity of cake) + (price of dozen + quantity of dozen) = total revenue.
First equation: Since the price of one cake is $15, the price of one dozen of doughnuts is $8, and the total revenue earned is $390, our first equation is:
15c + 8d = 390
We further know the sum of the total number of cakes and dozens sold equals the total amount of pastries sold:
total number of cakes + total number of dozens = total amount of pastries.
Second equation: Since the total amount of pastries sold is 40, our second equation is:
c + d = 40
Method to solve for c and d: Substitution
Step 1: Isolate c in the second equation to prepare for substitution:
(c + d = 40) - d
c = -d + 40
Step 2: Substitute -d + 40 for c in 15c + 8d = 390 (first equation in system) to solve for d:
15(-d + 40) + 8d = 390
-15d + 600 + 8d = 390
-7d + 600 = 390
-7d = -210
d = 30
Step 3: Plug in 30 for d in c + d = 40 to solve for c:
c + 30 = 40
c = 10
Thus, the number of dozens sold was 30 and the number of cakes sold was 10.
Optional Step 4: Check validity of answers by plugging in 30 for d and c for 10 in both c + d = 40 and 15d + 8c = 390:
Plugging in 30 for d and 10 for c in c + d = 40:
10 + 30 = 40
40 = 40
Plugging in 30 for d and 10 for c in 15d + 8c = 390:
15(10) + 8(30) = 390
150 + 240 = 390
390 = 390
Thus, our answers are correct