Answer:
She bought 22 number of cupcakes.
Explanation:
Let Mercedes bought x number of vanilla cupcakes and y number of chocolate cupcakes.
If she eats one of the vanilla cupcakes, then 1/7 of the remaining cupcakes will be vanilla.
So, we can write
⇒ x + y - 1 = 7x - 7
⇒ 6x - y = 6 ......... (1)
Now, if Mercedes instead eats two of the chocolate cupcakes, then 1/5 of the remaining cupcakes will be vanilla.
So, we can write
⇒ x + y - 2 = 5x
⇒ 4x - y = - 2 ............ (2)
Now, solving equations (1) and (2) we get
(6x - 4x) = 6 - ( - 2) = 8
⇒ 2x = 8
⇒ x = 4
Then, from equation (2) we get, y = 4x + 2 = 18
Therefore, she bought (18 + 4) = 22 number of cupcakes. (Answer)