The processes of combustion (for carbon-based fuels) and photosynthesis (for green plants)
are both involve CO2 and H2O, but for the former these compounds are products and for the
latter they are reactants.
Combustion takes fuels with high potential energy and converts them to products with low potential energy (CO2 and H2O).
Photosynthesis is the chemical reaction of CO2 and H2O to produce O2 and glucose, substances of high potential energy.
The processes also differ in that photosynthesis requires the input of energy (in the form of sunlight) and combustion releases energy (in several forms, including heat and light).