You don't need to find an integrating factor here; the left-hand side is already in a form which you can write directly as:
\(\frac{dy(x^2+1)}{dx}\) so your ode becomes \(\frac{dy(x^2+1)}{dx} = x^2-1\)
Now integrate both sides wrt x and proceed as normal.