Hi there.
Photosynthesis takes energy from the sun & carbon dioxide to make food & oxygen.
Cellular respiration uses the food & oxygen (the result of photosynthesis) to make carbon dioxide.
Photosynthesis uses the carbon dioxide from cellular respiration, which uses the food & oxygen from photosynthesis.
Hope this helped you!