This equation is easily separable as
[tex]\dfrac{\mathrm dy}{\mathrm dx}=\dfrac{x^2-x+k}{y-1}\implies(y-1)\,\mathrm dy=(x^2-x+k)\,\mathrm dx[/tex]
where the [tex]k[/tex] term is assumed to be some constant that was omitted from the question. Integrating both sides gives
[tex]\dfrac{y^2}2-y=\dfrac{x^3}3-\dfrac{x^2}2+kx+C[/tex]