To understand the answer you will need to know that when you change any number of dimensions, the outcome will be affect in the same way based on the number of dimensions that were changed and what measurement you need. A three dimensional measurement such as volume will only be affect by how many of those 3 dimensions are actually changing. In this example, there is only 1 dimension changing (the height), so the total volume will be affected in the same way, only one time doubled.
1 gallons x 2 = 2 gallons.
The capacity will be 2 gallons.