Let $f(x)=3x-2$, and let $g(x)=f(f(f(f(x))))$. If the domain of $g$ is $0\leq x\leq 2$, compute the range of $g$.
The min value of x is 0. Applying f 4 times, the min value is still 0.
The max value of x is 2. Applying f 4 times, the max value is 16.
So the range of g is [16,256].