so if the base is a square, which is 3'9" on a side, that means the tank is just a tall square, namely a rectangular prism.
since there are 12 inches in 1 foot, then 3 feet is 36 inches, and 3'9" is then 36" + 9" or 45 inches, so the base is a 45"x45" square.
now, let's covert the gallons to inches as well, namely in³, keeping in mind a (US) gallon has 231 in³, then 40 gallons will be 40*231 or 9240 in³.
![image](https://img.qammunity.org/2019/formulas/mathematics/middle-school/yyyvg237rt4nkhh0co1zen1fdgf3r3s4v6.png)