In integration by parts, you want $v$ to be something that is easy to integrate, $u$ is easy to differentiate, and $v\,du$ is easier to integrate than the original $u\,dv$.
In this case, the difficulty is integrating the fraction; and to make things more difficult, the fraction's denominator is squared. Here's one way to make that easier.
Let $dv=\frac{2x}{(x^2+2)^2}$. That is easy to integrate (can you see it?), and integrating it will reduce the power of the denominator. So then $u=\frac{x^2}2$ to get $u\,dv$ what we want.
Here is the rest:
We can see by inspection that the numerator of $dv$ is the derivative of the denominator. We therefore get $v=-\frac 1{x^2+2}$. Clearly $du=x\,dx$. So,
$$\begin{align}
\int\frac{x^3}{(x^2+2)^2}\,dx
&= uv-\int v\,du \\[2ex]
&= \frac{x^2}2\cdot -\frac 1{x^2+2}-\int-\frac 1{x^2+2}\cdot x\,dx \\[2ex]
&= -\frac 12\frac{x^2}{x^2+2}+\frac 12\int\frac{2x}{x^2+2}\,dx \\[2ex]
&= -\frac 12\frac{x^2}{x^2+2}+\frac 12\ln|x^2+2|+C_1 \\[2ex]
&= \frac{1}{x^2+2}-\frac 12+\frac 12\ln|x^2+2|+C_1 \\[2ex]
&= \frac{1}{x^2+2}+\frac 12\ln|x^2+2|+C_2
\end{align}$$
Either the last line or the one two lines above it are good answers. Those two lines have different arbitrary constants, since the $-\frac 12$ disappeared between them.
Is that clear?