Mass fraction in a mixture of metal salts given the total mass of the metal
You need to do a bit more math than that.
In order to solve the majority of problems in chemistry you need to switch to the amounts  of substances.

So, let's use the following notations: $\omega$ – mass fraction; $m$ – mass; $n$ – amount; $M$ – molecular mass.
I refer to $\ce{NaNO3}$ as compound $1$ and to $\ce{Na2SO4}$ as compound $2$.
Let's solve this algebraically first.
from the definition:

$$\omega_1 = \frac{m_1}{m} = \frac{n_1M_1}{m}$$

In order to find $n_1$, we use the sodium content in both salts

$$n(\ce{Na}) = \frac{m(\ce{Na})}{M(\ce{Na})} = n_1 + 2n_2 \implies n_1 = \frac{m(\ce{Na})}{M(\ce{Na})} - 2n_2$$ 

and total mass:

$$m = n_1M_1 + n_2M_2$$

Combining both equations (I let you do the math), you find $n_1$:

$$n_1 = \frac{m(\ce{Na})}{M(\ce{Na})} - \frac{2\left(m - \frac{m(\ce{Na})}{M(\ce{Na})}M_1\right)}{M_2 - 2M_1}$$

Now you can find the mass fraction of sodium nitrate:

$$
\begin{align}
\omega_1 &amp;= \frac{\left(\frac{m(\ce{Na})}{M(\ce{Na})} - \frac{2\left(m - \frac{m(\ce{Na})}{M(\ce{Na})}M_1\right)}{M_2 - 2M_1}\right)M_1}{m} \\
  &amp;= \frac{\left(\frac{\pu{1.61 g}}{\pu{23.00 g mol-1}} - \frac{2\left(\pu{5.37 g} - \frac{\pu{1.61 g}}{\pu{23.00 g mol-1}}\cdot\pu{85.00 g mol-1}\right)}{\pu{142.04 g mol-1} - 2\cdot\pu{85.00 g mol-1}}\right)\cdot\pu{85.00 g mol-1}}{\pu{5.37 g}} \\
  &amp;= 0.4513~\text{or}~45.13\%
\end{align}
$$