How to factorise $x^4 - 3x^3 + 2$, so as to compute the limit of a quotient? Question:

Find the limit: $$\lim_{x \to 1}\frac{x^4 - 3x^3 + 2}{x^3 -5x^2+3x+1}$$

The denominator can be simplified to: $$(x-1)(x^2+x)$$
However, I am unable to factor the numerator in a proper manner (so that $(x-1)$ will cancel out)
I know upon graphing that the limit is $5\over4$. What should I do here?
Note: To be done without the use of L'Hospital Rule

Hint: The numerator can be factorized as $$x^4-3x^3+2=x^4-1-3(x^3-1)=(x-1)((x^2+1)(x+1)-3(x^2+x+1))$$ and the denominator as $$x^4-5x^2+3x+1\\=x^4-1-(5x^2-3x-2)=(x-1)((x^2+1)(x+1)-(5x+2))$$
