Balanced equation
"2CO"("g") + "O"_2("g")"2CO(g)+O2(g)rarr→"2CO"_2("g")"2CO2(g)
To calculate moles "CO"CO and "O"_2"O2 required to produce "10 mol CO"_2"10 mol CO2, multiply mol "CO"_2"CO2 by the mol ratio between the desired reactant and "CO"_2"CO2 in the balanced equation, with the desired reactant in the numerator.
10color(red)cancel(color(black)("mol CO"_2))xx(2"mol CO")/(2color(red)cancel(color(black)("mol CO"_2)))="10 mol CO"
10color(red)cancel(color(black)("mol CO"_2))xx(1"mol O"_2)/(2color(red)cancel(color(black)("mol CO"_2)))="5 mol O"_2"