Answer
Independent variable: $n$.
dependent variable: $A$.
Work Step by Step
The number of gallons of paint $n$ represents an arbitrary input. Thereby, it is our independent variable.
The area $f(A)$ of the walls is represented an arbitrary output. Since $f$ is a function describing the area in dependence on $A$, our dependent variable is $A$.