At STP, 1 mol of gas occupies 22.4 L of space.
mol CO2 = 5.0 L * 1 mol/22.4 L = 0.2232 mol
Using the balanced equation, we use stoichiometry to convert our quantities. There are 2 CO2 moles for every mole of O2.
mol O2 = 0.2232 mol CO2 * 1 mol O2 / 2 mol CO2
= 0.1116 mol
Converting back to volume
volume O2 = 0.1116 mol * 22.4 L/1 mol
= 2.5 L
The answer to the question is 2.5 L of oxygen gas.