Plants take in carbon dioxide which is produced by animals . It takes in water, sunlight and carbon dioxide(produced by animals) to make food and oxygen is a by product in this hole process . So we can say that plants take in carbon dioxide (which is also harmful for nature and a by product of animals) and produce oxygen which is needed by all the animals to survive . So animals take in oxygen and give out carbon dioxide and plants take in carbon dioxide and give oxygen. Hope this helps you out!!!!!