Suppose n1 moles of O2 and no moles of n2 are mixed together.
So, average molecular weight of gaseous mixture
\((M) = \frac{32\times n_1 + 28\times n_2}{n_1 +n_2 }\)
Similarly for mixture,

M = 29.137 g mol-1
From eq. (1) and (2),

Mole fraction of O2 = 0.284
Mole fraction of N2 = 1 - 0.284 = 0.716
PO2 = PT × nO2
= 1 x 0.284
= 0.284 atm
PN2 = PT × nN2
= 1 × 0.716
= 0.716 atm
So,
PO2 = 0.284 atm
PN2 = 0.716 atm