The answer is 3,200 in.3
The volume of the rectangle (V) with length l, width w, and height h is:
V = l * w * h
If you want to fill the aquarium until you have a 2-inch gap between the top of the water level and the top of the aquarium, then the height of the water space is 2 inches smaller than the height of the aquarium. Therefore:
l = 20 in
w = 10 in
h = 18 in - 2 in = 16 in
The volume of the water is:
V = 20 * 10 * 16 = 3,200 in³