In order to find the answer we need to set the equation up first, so the reaction for photosynthesis is:
6 CO2 + 6 H2O + energy -> C6H12O6 + 6 O2
Now by checking the molar ratio between water and glucose we see that for every 6 moles of H2O we will end up having 1 mol of C6H12O6, so we have a 6:1 molar ratio, now in order to produce 0.500 we will find out by doing the following calculation:
6 H2O = 1 C6H12O6
x H2O = 0.500 C6H12O6
x = 3.00 moles of H2O are needed to produce 0.500 moles of glucose