Pressure exerted by the mixture of nonreactive gases $\pu{2.0 L}$ of $\ce{O2 (g)}$ and $\pu{8.0 L}$ of $\ce{N2}$, each at $\pu{0.00^\circ C}$ and $\pu{1.00 atm}$, are mixed together. The nonreactive gaseous mixture is compressed to occupy $\pu{2.0 L}$ at $\pu{298 K}$. What is the pressure exerted by this mixture?


I tried to solve this problem by first using

$$P_\mathrm{tot}=\frac{n_\mathrm{tot}RT}{V}\quad(T=\text{constant}; V=\text{constant})$$

then using

$$V_\mathrm{tot}=\frac{n_\mathrm{tot}RT}{P}\quad(T=\text{constant}; P=\text{constant})$$

Plugging in the numbers for the second equation

$$10=\frac{n_\mathrm{tot}\cdot 8.314\cdot 273}{101325}$$
$$n_\mathrm{tot}=\pu{0.45 mol}$$

Then plugging in the numbers for the first equation

$$P_\mathrm{tot}=\frac{0.45\cdot 8.314\cdot 298}{2}=\pu{6.76 atm}$$

Whereas the answer is $\pu{5.5 atm}$. What am I doing wrong here?
You did too many unnecessary steps and also didn't use unified units (e.g. liters instead of cubic meters, since you decided to use $R=\pu{8.314 J mol-1 K-1}$). I denoted both total pressures as $P_1$ and $P_2$ for simplicity since we don't need partial pressures here. From the ideal gas law:

$$P_2=\frac{n_2RT_2}{V_2}\tag{1}$$

Since both gases are not reacting at these conditions,

$$n_1=n_2=\frac{P_1V_1}{RT_1}\tag{2}$$

and (1) can be rewritten as following:

$$P_2=P_1\frac{V_1T_2}{V_2T_1}=\pu{1.00 atm}\cdot\frac{\pu{10.0 L}\cdot\pu{298.13 K}}{\pu{2.0 L}\cdot\pu{273.13 K}}\approx\pu{5.46 atm}\tag{3}$$