Determine the mole fraction
You're asked to find the mole fraction of $\ce{N2}$ after the reaction. That is defined by:

$$x_{\ce{N_2},\text{f}} = \frac{n_{\ce{N_2},\text{f}}}{n_{\text{tot},\text{f}}}$$

where $x$ indicates a mole fraction, $n$ the number of moles and the subscript $\text{f}$ means "final". Furthermore, since the container is sealed, no gases can escape the container. This means that:

$$\begin{align}
n_{\ce{N_2},\text{f}} &amp;= n_{\ce{N_2},\text{i}} + \Delta n_{\ce{N_2}} \\
n_{\text{tot},\text{f}} &amp;= n_{\text{tot},\text{i}} + \Delta n_{\text{tot}}
\end{align}$$

where the symbol $\text{i}$ indicates "initial" and $\Delta n$ indicates the change in the number of moles caused by the decomposition of $\ce{NH4NO3}$. The four quantities on the right-hand side of these two equations are the quantities that you will have to find.


$n_{\text{tot},\text{i}}$ - This can be found by using the ideal gas law, $pV = nRT$ with the data given before the explosion. Substituting $p = 56.01\mathrm{~kPa}$, $V = 1.18\mathrm{~L}$, and $T = 286{~K}$, you will find that $n_{\text{tot},\text{i}} = 0.0276\mathrm{~mol}$.
$n_{\ce{N_2},\text{i}}$ - Since 79% of pre-explosion air is $\ce{N_2}$, $n_{\ce{N_2},\text{i}} = (0.79)(0.0276\mathrm{~mol}) = 0.0218\mathrm{~mol}$.
$\Delta n_{\ce{N_2}}$ - This is related stoichiometrically to the number of moles of $\ce{NH4NO3}$. In fact, it is numerically equal, as the coefficients of $\ce{NH4NO3}$ and $\ce{N2}$ are the same. The molar mass of $\ce{NH4NO3}$ is $80.04\mathrm{~g~mol^{-1}}$, so $\Delta n_{\ce{N_2}} = (8\mathrm{~g})/(80.04\mathrm{~g~mol^{-1}}) = 0.100\mathrm{~mol}$.
$\Delta n_{\text{tot}}$ - This is also related stoichiometrically to the number of moles of $\ce{NH4NO3}$. Each mole of $\ce{NH4NO3}$ leads to the formation of $(2+4+1)/2 = 3.5\mathrm{~mol}$ of gaseous products (observe that water will be gaseous after the explosion due to the rise in temperature). Therefore, $\Delta n_{\text{tot}} = (3.5)(0.100\mathrm{~mol}) = 0.35\mathrm{~mol}$.


Putting it all together, we have:

$$x_{\ce{N2},\text{f}} = \frac{0.0218 + 0.100}{0.0276 + 0.35} = 0.323$$

Note that the mole fraction is dimensionless. The exact final temperature is also of no use; its only purpose is to tell you that water will exist as a gas (and therefore contribute to the total number of moles). It could be any other number above $100^\circ\mathrm{C}$ and the final answer would be the same, as the mole fraction is independent of temperature.

I hope I didn't mess up the arithmetic.