Ideal gas equation is given by
$pV = nRT ...(i)$
For oxygen, $p=1 atm , V =1 L , n = n _{0}$
Therefore equation (i) becomes
$\therefore 1 \times 1= n _{0,} RT$
$\Rightarrow n _{0_{2}}=\frac{1}{ RT }$
For nitrogen $p=0.5 atm , V =2 L , n = nN$
$\therefore 0.5 \times 2= n _{ N _{2}} RT$
$\Rightarrow n _{ N _{2}}=\frac{1}{ RT }$
For mixture of gas
$p _{mix} V _{mix}= n _{mix} RT$
Here, $n _{mix}= n O + n _{ N _{2}}$
$\therefore \frac{ p _{mix} V _{mix}}{ RT }=\frac{1}{ RT }+\frac{1}{ RT }$
$\Rightarrow p _{mix} V _{mix}=2$