Not sure but I think it’s:
1) both ; Animals and plants both respire, and CO2 is a waste product of respiration.
2) plants ; photosynthesis occurs in plants.
3) plants ; O2 is produced as a waste product of photosynthesis.
4) both ; Animals and plants use respiration to release energy and this process requires o2