Answer: 18 gallons.
Step-by-step explanation:
Let's call the total gallons that the container can hold x.
Then, based on the information given in the problem, you can write the following expression:
[tex]\frac{4}{9}x+4=\frac{2}{3}x[/tex]
Now, you must solve for x, as you can see below. Therefore, you obtain the following result:
[tex]\frac{4}{9}x+4=\frac{2}{3}x\\\\4=\frac{2}{3}x-\frac{4}{9}x\\\\4=\frac{2}{9}x\\\\4*9=2x\\\\36=2x\\\\x=18\ gallons[/tex]