Dear student,
The plants take in carbon dioxide (CO2) and water (H2O) from the air and soil respectively.
Within the plant cell, the water is oxidized, meaning it loses electrons, while the carbon dioxide is reduced, meaning it gains electrons.
This process occurs during photosynthesis and this transforms the water into oxygen and the carbon dioxide into glucose.
The plant then releases the oxygen back into the air, and stores energy within the glucose molecules.
Overall formula of photosynthesis is -
6CO2 + 6H2O + (energy) → C6H12O6 + 6O2
Carbon dioxide + water + energy from light produces glucose and oxygen.
Regards