the ideal gas law equation gives the relationship between pressure and number of moles
PV = nRT
where P is pressure
V - volume
n - number of moles
R - universal gas constant
T - Temperature
all the parameters remained constant therefore volume, temperature are constant
then pressure is directly proportional to number of moles
P = kn
where k is a constant
at the first instance
P1 = kn ---1)
n = initial number of moles
and second instance the pressure is doubled
then new pressure is 2P1 and lets name the new number of moles as n2
then
2P1 = kn2 --2)
then second instance divided by the first instance


n2 = 2n
therefore the new number of moles are twice the amount of initial number of moles
the number of moles of O₂ have been doubled