The reaction is not given here but we take an example reaction to understand how to calculate moles.
Let the balanced equation for the reaction is
C3H8 (g) + 5 O2 (g) → 3CO2 (g) + 4 H2O (g)
From here 5 moles of oxygen produces 3 moles of carbon dioxide
So 2.5 moles of oxygen produces 2.5/5 x 3 = 0.5 x 3 = 1.5 moles of carbon dioxide