Cycling of matter in cells
Photosynthesis stores light energy in glucose and respiration releases it again. So the same atoms cycle while the energy flows one way.
A worked example
A leaf takes in 0.08 g of carbon dioxide an hour across 6 hours of sunlight, so it absorbs 0.08 x 6 = 0.48 g.
The mistake people actually make
Plants respire day and night as well as photosynthesizing, so they use oxygen too. In osmosis it's the water that crosses the membrane, not the dissolved solute.