Here is the full question
Mercedes bought some vanilla cupcakes and some chocolate cupcakes. If she eats one of the vanilla cupcakes, then 1/7 of the remaining cupcakes will be vanilla. If Mercedes instead eats two of the chocolate cupcakes, then 1/5 of the remaining cupcakes will be vanilla. How many cupcakes did Mercedes buy?
Answer:
22
Explanation:
Let represent the number of vanilla cupcakes=v
and the number of chocolate cupcakes=c
So, total number of cupcakes Mercedes bought = (v+c)
When she eats 1 vanilla cupcake
Number of vanilla cupcakes remaining=v-1
Number of cupcakes remaining=v+c-1
However;
-------------------- equation 1
If Mercedes instead eats two of the chocolate cupcakes
Number of chocolate cupcakes remaining=c-2
However
--------------------- equation 2
From equation (1)
![v+c-1 = 7(v-1)](https://img.qammunity.org/2020/formulas/mathematics/middle-school/khd5jk4vof30lut2dyve1t4s2agrynauhw.png)
![v+c -1 = 7v -7](https://img.qammunity.org/2020/formulas/mathematics/middle-school/xtrwdmtcqvbvdux4q40ewjwcw44c4p9423.png)
![c-1+7 = 7v -v](https://img.qammunity.org/2020/formulas/mathematics/middle-school/yovht6yldrgzq7xxjv0kwtgqvh3ok3epxu.png)
![c+6 = 6v](https://img.qammunity.org/2020/formulas/mathematics/middle-school/jgiebdcj1k476sl4hw81eiknaowa9csqn6.png)
--------------------- equation (3)
From equation(2)
![(1)/(5)(v+c-2) = v](https://img.qammunity.org/2020/formulas/mathematics/middle-school/411z1r3uffawocwkz8otab4w64e4ydzccp.png)
![v+c-2 =5v](https://img.qammunity.org/2020/formulas/mathematics/middle-school/pvaz3ja1gb05qenpu573ven2tantwttxrv.png)
![c-2 = 5v-v](https://img.qammunity.org/2020/formulas/mathematics/middle-school/w9hfjunoyouryowtdm98luajanyam9ars3.png)
![c-2 =4v](https://img.qammunity.org/2020/formulas/mathematics/middle-school/ew0dm8azsrpo0yv5so1llr62v9py4n62k5.png)
![-2 = 4v-c](https://img.qammunity.org/2020/formulas/mathematics/middle-school/dd2fwfdytosgzntpad03nosq99prx0b87u.png)
--------------------- equation (4)
equating equation (3) and (4); we have:
![4v-c = -2](https://img.qammunity.org/2020/formulas/mathematics/middle-school/tjmfle7h0asr858n79g7x9ayjetcm6g4bd.png)
Subtracting equation (3) from (4); we have:
-
![4v-c = -2](https://img.qammunity.org/2020/formulas/mathematics/middle-school/tjmfle7h0asr858n79g7x9ayjetcm6g4bd.png)
![= 8](https://img.qammunity.org/2020/formulas/mathematics/high-school/63t7r6z03v95h4y01uhmpd1mb0jy86vzdz.png)
![v=(8)/(2)](https://img.qammunity.org/2020/formulas/mathematics/middle-school/uw16myf4ryrw78upms59sknxpo3knyvre7.png)
![v=4](https://img.qammunity.org/2020/formulas/mathematics/middle-school/scwa2ytu7cst86e9vdjf5bdqhfsv24w3ce.png)
From equation (3); let's replace v=4 in order to solve for c
6(4) -c = 6
24 -c = 6
-c = 6 - 24
-c = - 18
c = 18
Total number of cupcakes Mercedes bought=v+c
=4+18
=22