We cannot take only oxygen from the mixture of air. When we breathe we inhale all the gases present in air. Oxygen is the only gas except carbon dioxide in the atmosphere that is able to cross the alveolar membrane easily because of their more solubility than other gases. Thus only oxygen goes inside and all other gases comes out of the body while exhaling.