Hello!
The source of the oxygen atom used in the formation of the water in aerobic respiration is molecular oxygen (O₂).
The general chemical equation for Aerobic Respiration ("Aerobic" means "in the presence of oxygen") is:
C₆H₁₂O₆ + 6O₂ → 6CO₂ + 6H₂O
C₆H₁₂O₆ is Glucose, a common sugar. Aerobic Respiration occurs in a series of steps, the last one being called "Oxidative Phosphorylation". In this last step, molecular oxygen (O₂) from the air is used to generate energy and H₂O.
Have a nice day!