\(2x\left(x-4\right)^2-\left(x+5\right)\left(x-2\right)+2\left(x-5\right)^2-\left(x-1\right)^2\)
\(=2x\left(x^2-8x+16\right)-\left(x^2-2x+5x-10\right)+2\left(x^2-10x+25\right)-\left(x^2-2x+1\right)\)
\(=2x^3-16x^2+32x-x^2-3x+10+2x^2-20x+50-x^2+2x-1\)
\(=2x^3-16x^2+11x+59\)