Hi Melanie
You have 15 Bagels and 25 Donuts please see below
Equation 1 is for the total number of items 40
x + y = 40
Note here that y = 40 - x
Equation 2 is for the cost per item and the total cost
1.15x + 0.65y = 33.50
If we multiply Equation 1 by negative 0.65 we can eliminate y
Equation 1 becomes
-0.65x - 0.65y = -26
Combine the adjusted Equation 1 with Equation 2 then y is eliminated and we are left with
-0.65x - 0.65y = -26
1.15x + 0.65y = 33.50
0.5x = 7.50
Divide both sides by 0.5 to solve for x
x = 15
y = 25 ( because y = 40 - x = 40 - 15 = 25)
Checking in Equation 2
1.15(15) + 0.65(25) = 33.50
17.25 + 16.25 =33.50
33.50 = 33.50
Hope this helps