Question 1100352
<font color="black" face="times" size="3">
Let,
x = number of bagels she needs to eat (this is a positive whole number)
y = amount, in ounces, of cream cheese she needs to eat (this is some positive number which could be a whole number or a decimal number)


"An average bagel contains 30 mg of calcium" and "One ounce of cream cheese contains 25 mg of calcium". So if Leyla eats x bagels and y ounces of cream cheese, then she'll consume 30x+25y mg of calcium in total. She needs 370 mg of calcium meaning that the first equation is 30x+25y = 370


The second equation is 2x+0.4y = 12 because
she gets 2 mg of iron from each bagel, so 2*x mg of iron from all the bagels she eats
she also gets 0.4 mg of iron per ounce of cream cheese, giving another sub-total of 0.4*y mg of iron
Overall she consumes 2x+0.4y mg of iron. This amount must be equal to 12 as this is the target value for iron.


The two equations in this system are
30x+25y = 370
2x+0.4y = 12


Let's solve the second equation for x
2x+0.4y = 12
2x+0.4y-0.4y = 12-0.4y <font color=blue>subtract 0.4y from both sides</font>
2x = 12-0.4y
2x/2 = (12-0.4y)/2 <font color=blue>divide both sides by 2 to isolate x</font>
x = (12/2)-(0.4y/2)
x = 6-0.2y


Then plug this into the first equation
30x+25y = 370
30*(x)+25y = 370
30*(6-0.2y)+25y = 370 <font color=blue>x has been replaced with 6-0.2y</font>


Next we isolate y
30*(6-0.2y)+25y = 370
30*(6)+30*(-0.2y)+25y = 370 <font color=blue>distribute</font>
180-6y+25y = 370
180+19y = 370
180+19y-180 = 370-180 <font color=blue>subtract 180 from both sides</font>
19y = 190
19y/19 = 190/19 <font color=blue>divide both sides by 19 to get y all by itself</font>
y = 10


Use this value of y to find x
x = 6-0.2y
x = 6-0.2*10 <font color=blue>replace y with 10</font>
x = 6-2
x = 4

----------------------------------------------------
----------------------------------------------------

In summary we get
x = 4
y = 10

Recall that at the top of the problem, we let,
x = number of bagels she needs to eat 
y = amount, in ounces, of cream cheese she needs to eat


So Leyla needs to eat <font color=red>4 bagels</font> and <font color=red>10 ounces of cream cheese</font> to reach her goal (of consuming exactly 370 mg of calcium and 12 mg of iron)
</font>