(a) Let C and P represent the numbers of cakes and pies sold, respectively.
.. C +P = 40 . . . . . . . . . a total of 40 items were sold
.. 8C +10P = 356 . . . . . the revenue from the sale was $356
(b) We can multiply the first equation by -8 and add it to the second to eliminate C.
.. -8(C +P) +(8C +10P) = -8(40) +(356)
.. 2P = 36
.. P = 18
.. C = 40 -P = 22
22 cakes were sold
18 pies were sold