A bowl contained 320 grams of pure white sugar. Mixture $\mathrm{Y}$ was formed by taking $x$ grams of the white sugar out of the bowl, adding $x$ grams of brown sugar to the bowl, and then mixing uniformly. In Mixture Y, the ratio of the mass of the white sugar to the mass of the brown sugar, expressed in lowest terms, was $w: b$. Mixture Z is formed by taking $x$ grams of Mixture $\mathrm{Y}$ out of the bowl, adding $x$ grams of brown sugar to the bowl, and then mixing uniformly. In Mixture Z, the ratio of the mass of the white sugar to the mass of the brown sugar is $49: 15$. The value of $x+w+b$ is
(A) 48
(B) 49
(C) 139
(D) 76
(E) 104
Initially, the bowl contains $320 \mathrm{~g}$ of white sugar and $0 \mathrm{~g}$ of brown sugar.

Mixture $\mathrm{Y}$ contains $(320-x) \mathrm{g}$ of white sugar and $x \mathrm{~g}$ of brown sugar.

When Mixture Z (the final mixture) is formed, there is still $320 \mathrm{~g}$ of sugar in the bowl.

Since we are told that the ratio of the mass of white sugar to the mass of brown sugar is $49: 15$, then the mass of white sugar in Mixture Z is $\frac{49}{49+15} \cdot 320=\frac{49}{64} \cdot 320=49 \cdot 5=245 \mathrm{~g}$ and the mass of brown sugar in Mixture Z is $320-245=75 \mathrm{~g}$.

In order to determine the value of $x$ (and hence determine the values of $w$ and $b$ ), we need to determine the mass of each kind of sugar in Mixture Z in terms of $x$.

Recall that Mixture $\mathrm{Y}$ consists of $(320-x) \mathrm{g}$ of white sugar and $x \mathrm{~g}$ of brown sugar, which are thoroughly mixed together.

Because Mixture $\mathrm{Y}$ is thoroughly mixed, then each gram of Mixture $\mathrm{Y}$ consists of $\frac{320-x}{320} \mathrm{~g}$ of white sugar and $\frac{x}{320} \mathrm{~g}$ of brown sugar.

To form Mixture Z, $x \mathrm{~g}$ of Mixture $\mathrm{Y}$ are removed.

This amount of Mixture $\mathrm{Y}$ that is removed contains $x \cdot \frac{x}{320}=\frac{x^{2}}{320} \mathrm{~g}$ of brown sugar.

Mixture $\mathrm{Z}$ is made by removing $x \mathrm{~g}$ of Mixture $\mathrm{Y}$ (which contains $\frac{x^{2}}{320} \mathrm{~g}$ of brown sugar),then adding $x$ g of brown sugar.

Thus the mass of brown sugar, in $\mathrm{g}$, in Mixture $\mathrm{Z}$ is $x-\frac{x^{2}}{320}+x$.

Since Mixture Z includes $75 \mathrm{~g}$ of brown sugar, then

$$
\begin{aligned}
2 x-\frac{x^{2}}{320} & =75 \\
0 & =x^{2}-2(320) x+75(320) \\
0 & =x^{2}-640 x+24000 \\
0 & =(x-40)(x-600)
\end{aligned}
$$

Therefore, $x=40$ or $x=600$.

Since the initial mixture consists of $320 \mathrm{~g}$ of sugar, then $x<320$, so $x=40$.

This tells us that Mixture Y consists of $320-40=280 \mathrm{~g}$ of white sugar and $40 \mathrm{~g}$ of brown sugar. The ratio of these masses is $280: 40$, which equals $7: 1$ in lowest terms. Thus, $w=7$ and $b=1$.

Therefore, $x+w+b=40+7+1=48$.