One way to do this is to exploit the Pythagorean identity,
[tex]\cos^2x+\sin^2x=1[/tex]
to rewrite
[tex]\cos^3(3x)=\cos(3x)\cos^2(3x)=\cos(3x)(1-\sin^2(3x))[/tex]
so that
[tex]\displaystyle\int\cos^3(3x)\sin^7(3x)\,\mathrm dx=\int\cos(3x)\left(\sin^7(3x)-\sin^9(3x)\right)\,\mathrm dx[/tex]
Then substitute [tex]u=\sin(3x)[/tex] and [tex]\frac{\mathrm du}3=\cos(3x)\,\mathrm dx[/tex] to get the integral
[tex]\displaystyle\frac13\int u^7-u^9\,\mathrm du=\frac13\left(\frac{u^8}8-\frac{u^{10}}{10}\right)+C[/tex]
[tex]=\boxed{\dfrac{\sin^8(3x)}{24}-\dfrac{\sin^{10}(3x)}{30}+C}[/tex]
which is one correct form of the antiderivative. There's no reason we can't use the identity from before to express the integrand in terms of powers of cos(3x) instead.