The two form an open cycle. Photosynthesis takes energy from the sun, CO2, and water and makes food (sugars), and oxygen. Respiration takes food and oxygen and releases energy, CO2, and water. The reason it's an open cycle and not a closed one, is that energy is lost in every transferal. Energy needs to be replenished from the sun every time more food is produced.