Answer: -
Substance A is carbon dioxide and Substance B is oxygen.
Explanation: -
Photosynthesis reaction involves the process of conversion of light energy of the sun into chemical energy by the green chlorophyll found in plants leaves.
The chemical equation for the process is
6 CO₂ +6 H₂O → C₆H₁₂O₆ + 6O₂
As we can see Carbon dioxide CO₂ reacts with water H₂O to form glucose. Oxygen is the gaseous product formed.
Thus Substance A is carbon dioxide and Substance B is oxygen.