Seems like you’re asking about how many of these water bottles it will take to have one gallon of water.
A gallon is a measure of volume, 231 cubic inches.
It would be much easier to calculate if you used the same kind of units for both the gallon and the bottles. So one option is have them either both in volume or both in weight.
I would personally figure out how many oz are in the gallon and then divide by the number of oz in each bottle.
You could do that in a few steps or if you understood the process, you could input a single query into Google and get an answer (which may need a little bit of interpretation).
Google is a little bit funny in what it accepts and does not accept.
If you input “oz in a gallon divided by 16.9 oz” which is exactly what you want, it doesn’t give you a direct result.
But if you input “oz in a gallon divided by 16.9” it gives you a number with units of oz.
For “oz in a gallon divided by 16.9 oz” the units will cancel out since you’re dividing oz by oz.
So the result is that number without the units of oz.