OK good question. This is true of a lot of things on earth now, that every species needs another to survive, so how can they have evolved separately? The answer to your question is that plant cells evolved first. There was no oxygen, but there was already carbon dioxide in the earth s atmosphere when the first cell evolved. After a lot of trial and error, and many hundreds or thousands of years, one cell actually managed to evolve the ability to do photosynthesis.
It took carbon dioxide from the air and combined it with light to make energy. The oxygen produced was a waste product the cell didn t need, so it put the oxygen back into the air. This cell did really well because it could produce its own energy and evolved into plants. As soon as photosynthesis was invented there was oxygen in the air. Other cells that could not photosynthesise were then able to take this oxygen and respire to produce energy.
These cells were to be the animal cells. Now it is true that neither plants nor animals could survive without the other, because they have evolved over many millions of years to live together on the planet. But back when things first began it was very different.
Plants can do just fine without all the meddling animals around. Animals really are the servants of plants.
They re there because plants can provide the food in the first place, they are there because plants are fine with them being around (some of those buggers serve well to spread them seeds). Ignoring microorganisms, animals are almost completely dispensable for survival of the plant kingdom. The pollinators will be missed for a while, but they are quite optional, the plants can easily evolve to live without them.