First, you used parts: with $u = x$ and $dv = \frac{x}{(x^2+1)^2}dx$, you got $$\int\frac{x^2}{(x^2+1)^2}dx = xv - \int v\,dx.\tag{1}$$
From here, I suggested the substitution $t = x^2$ in order to integrate $dv$ and get $v$.
Doing this, we see that $dt = 2x\,dx$, so $x\,dx = \frac{1}{2}dt$.
Thus $$v = \int dv = \int \frac{x}{(x^2+1)^2}dx = \frac{1}{2} \int \frac{dt}{(t + 1)^2}.$$
This latter integral is easy: if you can't guess it, let $s = t + 1$.
In any case, we get $$v = -\frac{1}{2(t+1)} = -\frac{1}{2(x^2+1)}.$$
Going back to $(1)$,
$$\int\frac{x^2}{(x^2+1)^2}dx = -\frac{x}{2(x^2+1)} + \frac{1}{2} \int \frac{dx}{x^2+1}$$
and you should recognize the final integral as $\arctan{x}$.
Putting it all together, the answer is
$$\frac{1}{2}\arctan{x} - \frac{x}{2(x^2+1)} + C.$$