\(\left(x^2-3x+2\right)\left(x^2-9x+20\right)-40=\left(x-1\right)\left(x-2\right)\left(x-4\right)\left(x-5\right)-40\)
\(=\left(x^2-6x+5\right)\left(x^2-6x+8\right)-40\)
Đặt \(t=x^2-6x+5\) thì ta có \(t\left(t+3\right)-40=t^2+3t-40=\left(t+8\right)\left(t-5\right)\)
Suy ra \(\left(x^2-6x+5\right)\left(x^2-6x+8\right)-40=\left(x^2-6x+13\right)\left(x^2-6x\right)=x\left(x-6\right)\left(x^2-6x+13\right)\)