Such problems are easy using the Heaviside cover up method,. As I show in that answer, the method generalizes to quadratic denominators. Let's apply it to your problem.
$$\dfrac{a}{x+1} + \dfrac{b}{(x+1)^2} + \dfrac{cx+d}{x^2+1}\, =\, \dfrac{2x}{(x+1)^2(x^2+1)}\tag{E}$$
Multiplying $\rm\,(E)\,$ by $\,(x+1)^2,\,$ then evaluating at its root $\,x = -1\,$ yields
$$\ b\, =\, \dfrac{2x}{x^2+1}\Bigg|_{\large x\,=\,-1} =\, -1$$
Subtracting out this known summand leaves a fraction in partial form, so we are done:
$$\ \dfrac{2x}{(x+1)^2(x^2+1)}\, -\, \dfrac{-1}{(x+1)^2}\, =\, \dfrac{2x+x^2+1}{(x+1)^2(x^2+1)}\, =\, \dfrac{1}{x^2+1}\quad {\bf QED}$$
Remark $\ $ It is quite instructive to use the quadratic Heaviside method for all terms:
Multiplying $\rm\,(E)\,$ by $\,x^2+1\,$ then evaluating at its root $\,x = i\,$ yields
$$ \color{#0a0}c\, i + \color{#c00}d\, =\, \dfrac{2i}{(i\!+\!1)^2} \, =\, \dfrac{2i}{2i} \,=\, \color{#c00}1\,\Rightarrow\ \color{#0a0}{c = 0},\ \color{#c00}{d = 1} $$
Multiplying $\rm\,(E)\,$ by $\,(x+1)^2\,$ then evaluating at its root $\,x = w,\,$ so $\,\color{#c0d}{w^2\!+\!1 = -2w}$
$$a(w+1)+ b\, =\, \dfrac{2w}{\color{#c0d}{w^2\!+\!1}}\,=\,\dfrac{\ \ \,2w}{\color{#c0d}{-2w}} \,=\, -1\,\Rightarrow\ a=0\,\Rightarrow\, b=-1 $$