$$
\begin{align*}
(x+(1/x))\frac{dy}{dx} +2y &= 2(x^2+1)^2\\
\left(\frac{x^2+1}{x}\right)\frac{dy}{dx} +2y &= 2(x^2+1)^2\\
\frac{dy}{dx} +\frac{2xy}{x^2+1} &= 2x(x^2+1) \tag{A}\\
\frac{dy}{dx} +P(x)y &= Q(x)\\
\end{align*}
$$
where $\displaystyle{P(x) = \frac{2x}{x^2+1}}$ and $\displaystyle{Q(x) = 2x(x^2+1)}$
$$\displaystyle{\int \frac{2x}{x^2+1} = \ln(x^2+1)}$$
The integrating factor = $\displaystyle{e^{\int P(x) dx}}$ which is
$\displaystyle{e^{\ln(x^2+1)}} = x^2+1$ (why?)
$(A)$ simplifies to
$$\frac{d}{dx}\left( (1+x^2)y \right) = 2x(1+x^2)$$
I could finish it completely, but can you figure the rest (by integrating both sides)?