Since no feedback from the OP has been given for a couple of days, I am going to git-r-done. If we multiply through by $x$, we obtain:
$$xu'+u=\frac{2}{x}-4x$$
Something wonderful has transpired here, for behold, the left side of the ODE may now be written as:
$$\frac{d}{dx}\left(xu\right)=\frac{2}{x}-4x$$
Now, upon integrating through with respect to $x$, we obtain:
$$ux=2\ln(x)-2x^2+c_1$$
Dividing through by $x$, we find:
$$u=\frac{2}{x}\ln|x|-2x+\frac{c_1}{x}$$
Back-substitute for $u$:
$$\d{y}{x}=\frac{2}{x}\ln|x|-2x+\frac{c_1}{x}$$
Integrating again with respect to $x$, we now obtain the general solution to the original ODE:
$$y(x)=\ln^2|x|-x^2+c_1\ln|x|+c_2$$