\(3x^4+2x^3-8x^2-2x+5\)
\(=3x^4-3x^3+5x^3-5x^2-3x^2+3x-5x+5\)
\(=3x^3\left(x-1\right)+5x^2\left(x-1\right)-3x\left(x-1\right)-5\left(x-1\right)\)
\(=\left(3x^3+5x^2-3x-5\right)\left(x-1\right)\)
\(=\left[3x\left(x^2-1\right)+5\left(x^2-1\right)\right]\left(x-1\right)\)
\(=\left(3x+5\right)\left(x^2-1\right)\left(x-1\right)\)
\(=\left(3x+5\right)\left(x+1\right)\left(x-1\right)\left(x-1\right)=\left(3x+5\right)\left(x+1\right)\left(x-1\right)^2\)
b, \(2x^4-9x^3+4x^2+21x-18\)
\(=2x^4-2x^3-7x^3+7x^2-3x^2+3x+18x-18\)
\(=2x^3\left(x-1\right)-7x^2\left(x-1\right)-3x\left(x-1\right)+18\left(x-1\right)\)
\(=\left(2x^3-7x^2-3x+18\right)\left(x-1\right)\)