How to calculate the amount of substance of nitrogen that dissolves in water?
Unfortunately, various definitions of Henry’s law and the corresponding proportionality constant $H$ or $K_\mathrm H$ exist. (For several definitions and corresponding parameter values, see Sander, R. Compilation of Henry’s law constants (version 4.0) for water as solvent. Atmos. Chem. Phys. 2015, 15, 4399–4981.) Therefore, it is important to identify the dimensions of the given data. In the question, the proportionality constant is given as Henry volatility $K_\mathrm H$ with

$$K_\mathrm H = 10^5\ \mathrm{atm}$$

Apparently,* since the given Henry volatility $K_\mathrm H$ is expressed in terms of pressure (the unit symbol “atm” stands for “standard atmosphere”, which is an obsolete unit of pressure; the use of this unit is actually deprecated), the used definition is

$$K_\mathrm H=\frac{p_{\ce{N2}}}{x_{\ce{N2}}}$$

where $p_{\ce{N2}}$ is partial pressure of nitrogen and $x_{\ce{N2}}$ is amount-of-substance fraction (the use of the unsystematic name “mole fraction” is deprecated) of nitrogen in the aqueous phase.

The amount-of-substance fraction $x_{\ce{N2}}$ is defined as 

$$x_{\ce{N2}}=\frac{n_{\ce{N2}}}{n}$$

where $n_{\ce{N2}}$ is the amount of substance of nitrogen and $n$ is the total amount of substance. For dilute aqueous solutions, the total amount of substance is approximately equal to the amount of water

$$n\approx n_{\ce{H2O}}$$

which is given as $n_{\ce{H2O}}=10\ \mathrm{mol}$.

Thus, the amount of nitrogen $n_{\ce{N2}}$ can be calculated from the partial pressure of nitrogen $p_{\ce{N2}}$ as

$$\begin{aligned}
n_{\ce{N2}}&amp;=n\cdot x_{\ce{N2}}\\
&amp;=n\cdot \frac{p_{\ce{N2}}}{K_\mathrm H}\\
&amp;\approx n_{\ce{H2O}}\cdot \frac{p_{\ce{N2}}}{K_\mathrm H}
\end{aligned}$$

For a mixture of gases, the partial pressure of nitrogen $p_{\ce{N2}}$ is defined as

$$p_{\ce{N2}}=x_{\ce{N2}}\cdot p$$

where $x_{\ce{N2}}$ is the amount-of-substance fraction of nitrogen in the gaseous phase (as apposed to the above-mentioned parameter in Henry’s law) and p is the total pressure.

Since the total pressure is given as $p=5\ \mathrm{atm}$ and the amount-of-substance fraction of nitrogen in air is given as $x_{\ce{N2}}=0.8$, the partial pressure of nitrogen in air is

$$\begin{aligned}
p_{\ce{N2}}&amp;=x_{\ce{N2}}\cdot p\\
&amp;=0.8\times5\ \mathrm{atm}\\
&amp;=4\ \mathrm{atm}
\end{aligned}$$

* This use of the unit is in the question is actually not permissible. The unit symbol should not be used to provide specific information about the quantity and should never be the sole source of information on the quantity.