The overall equation for photosynthesis is 6 CO2 + 12 H2O + light → C6H12O6 + 6 O2 + 6 H2O. This means its reactants are 6 parts CO2, 12 parts H2O, and light. When combined in those proportions, they become 6 parts O2 and 6 parts H2O (After going through photosynthesis).
The overall equation for aerobic respiration is C6H12O6 + 6O2 → 6CO2 + 6H2O + Energy. This means its reactants are one part C6H12O6 and 6 parts O2, while the products are 6 parts CO2, 6 parts H2O, and energy (After going through aerobic respiration). The energy comes in the form of ATP.
2 of photosynthesis's products are C6H12O6 and O2, which are also the requirements for aerobic respiration. 2 of aerobic respiration's products are CO2 and H2O, which are also the reactants in photosynthesis. This means that the two complement each other very well, and each process allows the other to continue working, which in return allows the first process to continue as well.