Set up a triangle with side lengths $x$ and $3,$ then the hypotenuse has length $\sqrt{x^2+9}.$ Choosing the angle opposite one of these legs to be $\theta.$ It doesn't matter which one, but just keep your choice consistent.
I'm choosing $\theta$ opposite $3$. This means that hypotenuse/opposite gives us $\sec(\theta)=\frac{\sqrt{x^2+9}}{3},$ or $3\sec(\theta)=\sqrt{x^2+9}.$ Making this choice also provides us with $\frac{3}{x}=\tan(\theta),$ or $\frac{1}{x}=\frac{\tan(\theta)}{3}.$ Lastly, we have $\cot(\theta)=\frac{x}{3},$ so $\frac{dx}{3}=-\csc^2(\theta)d\theta.$ This makes original integral into the following (not as definite integral)
$$ \int3\sec(\theta)\cdot \left(\frac{\tan(\theta)}{3}\right)^6\cdot(-3)\csc^2(\theta)d\theta.$$
A quick reduction of the integrand using algebra gives us
$$ \frac{-1}{3^4}\int \tan^6(\theta)\cdot\csc(\theta)d\theta.$$
This can be done via a $u-$substitution where $\sec(\theta)=u,$
yielding
$$\frac{\sec^5(\theta)}{5}-\frac{2\sec^3(\theta)}{3}+\sec(\theta)+C$$
Recall that $\sec(\theta)=\frac{\sqrt{x^2+9}}{3},$ and I leave the rest of the computation to you.