<s>[INST] Finding the result of the polynomial The question is that: Given that $x^2 -5x -1991 = 0$, what is the solution of $\frac{(x-2)^4 + (x-1)^2 - 1}{(x-1)(x-2)}$
I've tried to factorize the second polynomial like this: 
$\frac{(x-2)^4 + (x-1)^2 - 1}{(x-1)(x-2)}
=\frac{(x-2)^4+x(x-2)}{(x-1)(x-2)}
=\frac{(x-2)((x-2)^3+x)}{(x-1)(x-2)}=\frac{(x-2)^3+x}{(x-1)}$
However I could not solve it with the given equation $x^2 -5x -1991 = 0$. I know that direct substitution may work, but I think that there is a neat solution to this polynomial. Thanks in advance! 
Edited: 
I've found the way to solve it with the help of lhf
$\frac{(x-2)^4+(x-1)^2-1}{(x-1)(x-2)}=\frac{((x-2)^2+1)((x-2)^2-1)+(x-1)^2}{(x-1)(x-2)}=\frac{(x^2-4x+5)(x-1)(x-3)+(x-1)^2}{(x-1)(x-2)}=\frac{(x^2-4x+5)(x-3)+x-1}{(x-2)}=\frac{(x^2-4x+5)(x-2)-x^2+4x-5+x-1}{(x-2)}=\frac{(x^2-4x+5)(x-2)-(x-2)(x-3)}{(x-2)}=x^2-5x+8$
 [/INST] Try making the question simpler.
Let $t=x-2$ then $x-1$ will become $t+1$. So the question
$$\dfrac{(x-2)^4 + (x-1)^2 - 1}{(x-1)(x-2)}$$
changes to
$$\dfrac{t^4 + (t+1)^2 - 1}{t(t+1)}$$
$$\implies\dfrac{t^4 + t²+1+2t - 1}{t(t+1)}$$
$$\implies\dfrac{t^4 + t²+2t}{t(t+1)}$$
$$\implies\dfrac{t(t²-t+2)(t+1)}{t(t+1)}$$
$$\implies t²-t+2$$
$$\implies (x-2)²-(x-2)+2$$
$$\implies x²+8-5x$$
Now, 
$$x²-1991-5x=0$$
Or
$$x²-5x=1991$$
So
$$x²+8-5x=1991+8$$
$$=1999$$
</s>