Since other answerers have already explained how to solve the question at hand, I'll focus on a more general problem solving strategy. The integral in question,
$$
\int \frac{x^4}{\sqrt{x^2+9}} \, dx \, ,
$$
has an expression involving $\sqrt{x^2+9}$. This should make it obvious that a trigonometric substitution is the way to go, and I'll explain why. The identities
\begin{align}
\sin(\theta)^2+\cos(\theta)^2&=1 \tag{1}\label{1}\\
\tan(\theta)^2+1&=\sec(\theta)^2 \tag{2}\label{2}
\end{align}
come in handy here. $\eqref{1}$ can be rearranged to
$$
\cos(\theta)=\sqrt{1-\sin(\theta)^2} \, .
$$
(The reason that we don't bother writing $\cos(\theta)=\pm\sqrt{1-\sin(\theta)^2}$ is quite subtle; I'll leave it as a footnote if you're interested.)
These identities imply that any integral of the form
$$
\int f\left(\sqrt{1-x^2}\right) \, dx
$$
can be simplified if we let $x=\sin(\theta)$. Since $dx=\cos(\theta)d\theta$, we obtain
$$
\int f(\cos(\theta))\cos(\theta) \, d\theta \, ,
$$
meaning we can avoid the pesky square root sign. For much the same reason,
$$
\int f(x^2+1) \, dx
$$
can often be simplified if we write $x=\tan(\theta)$. Your problem was almost the same—it is just that we had to substitute $x=3\tan(\theta)$ because we were dealing with $\sqrt{x^2+9}$ rather than $\sqrt{x^2+1}$. Integration by parts doesn't offer an obvious way of simplifying the integral, unlike this method.
To fully appreciate why we don't write $\cos(\theta)=\sqrt{1-\sin(\theta)^2}$ one must be familiar with why integration by substitution works in the first place:
Integration by substitution
Integration by substitution comes from reversing the chain rule. Recall that if $y=f(g(x))$, then
$$
\frac{dy}{dx}=f'(g(x))g'(x) \, .
$$
Thus,
$$
\int f'(g(x))g'(x) \, dx = f(g(x))+C \, .
$$
On the other hand, if we make the substitutions $u=g(x)$ and $du = g'(x) \, dx$, then the integral becomes
$$
\int f'(u) \, du=f(u)+C=f(g(x))+C \, .
$$
It just so happens that working out $du/dx$ and then 'multiplying by $du$' means that you will make the correct substitutions. The formula can be summarised as
$$
\int f(g(x))g'(x) \, dx = \int f'(u) \, du \quad \text{where $u=g(x)$} \, .
$$
In Leibnizian notation, it reads particularly well
$$
\int \frac{dy}{du} \cdot \frac{du}{dx} \, dx = \int \frac{dy}{du} \, du \, .
$$
Again, the $dx$'s 'cancel' in a similar fashion to the chain rule.
More Sophisticated Substitutions
A more sophisticated way of making substitutions is given in Michael Spivak's Calculus. Integrals of the form
$$
\int f'(g(x))g'(x) \, dx
$$
can be easily solved by substituting $u=g(x)$. In fact, many of these integrals are so simple that you can do them in your head. However, the substitution $u=g(x)$ can still be made even if the factor $g'(x)$ does not appear. In general,
$$
\int f(g(x)) \, dx \tag{*}\label{*}
$$
can be solved in the following way, provided that $g$ is one-to-one:
\begin{align}
u &= g(x) \\
x &= g^{-1}(u) \\
\frac{dx}{du} &= (g^{-1})'(u) \\
dx &= (g^{-1})'(u)du
\end{align}
This means that \eqref{*} can be transformed to
$$
\int f(u)(g^{-1})'(u) \, du \, ,
$$
which in practice often makes the integral simpler to solve than before. Hence,
$$
\int f(g(x)) \, dx = \int f(u)(g^{-1})'(u) \, du \, .
$$
The validity of this approach can be demonstrated by differentiating $\int f(u)(g^{-1})'(u)$ with respect to $x$:
\begin{align}
\frac{d}{dx}\int f(u)(g^{-1})'(u) \, du &= f(u)(g^{-1})'(u)\frac{du}{dx} \\
&= f(u) \frac{dx}{du} \frac{du}{dx} \\
&= f(g(x)) \, .
\end{align}
Why we ignore the $\pm$ signs
This means that we can make a substitution of the form $x=\ldots$, what we are really doing is making a substitution of the form $u=\ldots$ and then taking the inverse. Say we are solving
$$
\int \sqrt{1-x^2} \, dx \, .
$$
When we write
$$
\text{let $x=\sin(\theta)$} \, ,
$$
what we really mean is let $\theta=\arcsin(x)$, meaning that $x=\sin(\theta)$ with $-\pi/2 \leq \theta \leq \pi/2$. Notice that $\arcsin$ is a one-to-one function, meaning that the substitution is valid. Then, since $-\pi/2 < \theta < \pi/2$, we know that $\cos(\theta)$ is positive, so we can drop the $\pm$ sign.