For plants it was turning sunlight into chlorophyl.
For animals ,that depends on which animal or organism the question pertains to. The main problem here is with the ambiguity of the question.
hunted animals and gathered wild plants
They survive thourgh the water cycle. First it starts in evaporation,condensation,precipitation,runoff and then transpiration. It then starts all over again.
The animal that first evolved, I guess. But no one knows what that was (because it lived millions and billions of years ago) or if there was an animal that evolved before all other animals. It would have eaten plants though because plants are plants, not animals and they use photosynthesis to survive.
plants so the animals can have oxygen
Plants were first.
First of all if plants were gone then eventually there would be no air because plants breath in carbon dioxide and breath out oxygen whereas humans and animals breath in oxygen and breath out carbon dioxide (Therefore plants can't survive without animals and animals can't survive without plants). Also without plants then herbivores would starve and die out and the carnivores would eat each other and then die out and finally humans would die because all the animals and plants died. But the lack of air and starvation would happen at the same time. (But the lack of air would come first.)
plants
There were no animals or plants at the start of the earth. Cyanobacteria maybe
Unicellular plants and animals were first forms of life on Earth
Animals were created first, then shortly after plants were created because some animals were made to not eat meat, so plants were created.
Glucose is found in both plants and animals. Plants produce glucose by photosynthesis, and animals consume glucose (it is the first reactant for cellular respiration).
first lvl consumers are animals that eat plants animals that eat animals that eat plants are 2nd lvland so on