Photosynthesis and cellular respiration are complementary processes by which living things obtain needed substances.
They both consume and create the same substances (water, glucose, oxygen, and carbon dioxide) but in different ways.
Photosynthesis makes the glucose that is used in cellular respiration to make ATP. The glucose is then turned back into carbon dioxide, which is used in photosynthesis.
While water is broken down to form oxygen during photosynthesis, in cellular respiration oxygen is combined with hydrogen to form water.