That's wrong. During oxidative phosphorylation oxygen reacts with hydrogen to form water. CO2 is instead released by degradation of glycose during glycolysis and the krebs cycle. It's the same in photosynthesis, water is split into hydrogen and oxygen and CO2 is assimilated in the calvin cycle