It's simpler if you first get rid of $r$: substitute $x=rt$, so your integral becomes
$$
\int\frac{1}{r^3(t^2+1)^{3/2}}r\,dt
$$
We can ignore $1/r^2$ for the time being and reinsert it at the end: now
$$
\int\frac{1}{(t^2+1)^{3/2}}\,dt=
\int\frac{t^2+1-t^2}{(t^2+1)^{3/2}}\,dt=
\int\frac{1}{(t^2+1)^{1/2}}\,dt+
\int t\frac{-t}{(t^2+1)^{3/2}}\,dt
$$
Do the last by parts as indicated:
$$
\int t\frac{-t}{(t^2+1)^{3/2}}\,dt=
t\frac{1}{(t^2+1)^{1/2}}-\int\frac{1}{(t^2+1)^{1/2}}\,dt
$$
The two integrals now cancel!
$$
\int\frac{1}{(t^2+1)^{3/2}}\,dt=\frac{t}{(t^2+1)^{1/2}}+c
$$
Reinsert the factor $1/r^2$ and back substitute:
$$
\int\frac{1}{(x^2+r^2)^{3/2}}\,dx=
\frac{1}{r^2}\frac{x/r}{(x^2/r^2+1)^{1/2}}+c=\frac{1}{r^2}\frac{x}{(x^2+r^2)^{1/2}}+c
$$