Set up a system of equations:
[tex]x + y = 15[/tex]
[tex]5x + 7y = 91[/tex]
x is how many cakes were made, y is how many pies were made, 5 represents the cost of each cake, and 7 represents the cost of each pie.
We'll solve the system through elimination. Multiply the entire first equation by -5:
[tex](x + y = 15) \times -5 = (-5x - 5y = -75)[/tex]
The system should now look like this:
[tex]-5x - 5y = -75[/tex]
[tex]5x + 7y = 91[/tex]
Combine the two equations to eliminate x:
[tex]2y = 16[/tex]
Divide both sides by 2 to get y by itself:
[tex]y = 8[/tex]
There were 8 pies made.
Plug in the value for y into the original first equation:
[tex]x + 8 = 15[/tex]
Subtract both sides by 8 to get x by itself:
[tex]x = 7[/tex]
There were 7 cakes made.