“...plants breathe CO2 and exhale Oxygen...” - In your example, there was already “O” in the “CO2”.
Mars has CO2, so what’s the problem?