Given the mass of precipitate, how can I calculate the relative amount of the original dissolved compounds? A simple mixture of $\ce{NaCl}$ and $\ce{NaBr}$ weighing $0.180~ \mathrm{g}$ is treated with $\ce{AgNO3}$ solution to give $0.3715~ \mathrm{g}$ of precipitate. Calculate the content of $\ce{NaCl}$ and $\ce{NaBr}$ in the mixture.


The answer given in book are $\ce{NaCl}$ = $0.0682~ \mathrm{g}$ and $\ce{NaBr}$ = $0.1118~ \mathrm{g}$.

The answers I got are $0.1519~ \mathrm{g}$ $\ce{NaCl}$ and $0.0281~ \mathrm{g}$ $\ce{NaBr}$. Please tell me where I made mistake.

Working:

$$\ce{NaCl + AgNO3 -&gt; NaNO3 + AgCl}$$
$58.5~ \mathrm{g}$ $\ce{NaCl}$ give $143.5~ \mathrm{g}$ $\ce{AgCl}$

$0.3715~ \mathrm{g}$ $\ce{AgCl}$ give $58.5/143.5 \cdot 0.3715~ \mathrm{g}$ $\ce{NaCl}$ = $0.1519~ \mathrm{g}$ $\ce{NaCl}$

$\ce{NaBr}$ = $0.180 ~ \mathrm{g}$ - $0.1519~ \mathrm{g}$ = $0.0281~ \mathrm{g}$ $\ce{NaBr}$
x = number of moles of chloride
y = number of moles of bromide

Since you know the mass of the original $\ce{NaCl}$/$\ce{NaBr }$mixture and the molar masses of $\ce{NaCl}$ and $\ce{NaBr}$, you can write an equation of the form:

$58.44 \pu{\frac{g}{mol}}~ x + 102.89 \pu{\frac{g}{mol}}~ y = 0.180~ \pu{g}$

Based on this idea, you can write a similar equation for the final products $\ce{AgCl}$ and $\ce{AgBr}$. With that in hand you will then have a system of equations you can solve (for x and y) that can be converted back into the masses of those salts.