Answer
Please see the work below.
Work Step by Step
The following two methods can be used to distinguish between $O_2$ and $CO_2.$
1. We know that $O_2$ supports combustion while $CO_2$ does not support combustion.
2. When we pass $O_2$ through $Ca(OH)_2$ solution, no reaction occurs, but if we pass $CO_2$ through the same solution, then $CaCO_3$ is precipitated.