Hey there! :D
During the process of photosynthesis, leaves turn carbon dioxide and water into glucose and oxygen. (glucose is just a fancy word for sugar)
So "A" is correct.
We need trees to make oxygen as a waste, or product, of the reaction. Similarly, we take in oxygen and breathe out carbon dioxide. As a cycle.
I hope this helps!
~kaikers