you can use substitution for this question:
Let $$ u = \frac{x}{3} $$
$$ \frac{du}{dx} = \frac{1}{3} $$
Therefore, $$ 3\cdot du = dx $$.
Now substitute.
$$ \int 3 \cos^3(u)\cdot du$$
Here we can split the integral up like this:
$$ 3 \int \cos^2(u) \cos(u) du$$
Using the identity:$$ 1 = \sin^2(x) + \cos^2(x) $$
We can now write our integral as:
$$ 3 \int (1-sin^2(u))\cos(u)du $$
Now we have another substitution case:
Let $$v = \sin(u)$$
$$dv = \cos(u)du $$
so now our integral will simply be:
$$ 3 \int (1 - v^2)dv $$
Now the integral is quite simple and you can proceed. Does that help?