Suppose a heated 5.00 g sample of sodium bicarbonate lost a mass of 1.00 g, what percent of impurity is in the sample?
First there is a big gotcha. We'll let $x$ be the grams of sodium bicarbonate and $y$ be the grams of the impurity. Since we were given no information about the impurity we must assume that the impurity neither loses mass nor gains mass when heated with the sodium carbonate. So: $$x + y = 5.00$$

Well the balanced equation is really:

$\ce{2NaHCO3(s) -&gt; Na2CO3(s) + H2O(g) + CO2(g)}$

so 2 moles of $\ce{NaHCO3}$ yields 1 mole of $\ce{Na2CO3}$. Thus the mass conversion factor is: $$\dfrac{0.5*\text{MW(}\ce{Na2CO3}\text{)}}{\text{MW(}\ce{NaHCO3}\text{)}} = \dfrac{0.5*106.0}{84.0}= 0.6310$$

So we now also have: $$0.6310x + y = 4.00$$

Subtracting the second equation from the first we get: $$0.3690x=1.000$$ so $$x=2.71g$$ and $$\text{Purity} = \dfrac{2.71}{5} = 54.2\%$$ $$\text{Impurity} = 100\% - 54.2\% = 45.8\%$$