50 points and I’ll mark you brainiest if correct.

Answer:
The container can hold 18 gallons
Step-by-step explanation:
Assume the container can hold x gallons
∵ The container is [tex]\frac{2}{3}[/tex] full with water
∵ It can hold x gallons
→ Multiply [tex]\frac{2}{3}[/tex] by x to find the number of gallons in the container
∴ The number of gallons in the container = [tex]\frac{2}{3}[/tex] x
∵ 4 gallons of water pouring out
∵ It is [tex]\frac{4}{9}[/tex] full
→ Multiply [tex]\frac{4}{9}[/tex] by x to find the number of gallons left in it
∴ The number of gallons left in the container = [tex]\frac{4}{9}[/tex] x
→ The difference between the numbers of gallons is 4 gallons
∵ [tex]\frac{2}{3}[/tex] x - [tex]\frac{4}{9}[/tex] x = 4
→ Subtract the terms of the left side
∴ [tex]\frac{2}{9}[/tex] x = 4
→ Multiply both sides by 9
∴ 2x = 36
→ Divide both sides by 18
∴ x = 18
∵ x represents the full of the container
∴ The container can hold 18 gallons