a) \(x^4+1997x^2+1996x+1997\)
\(=\left(x^4-x\right)+\left(1997x^2+1997x+1997\right)\)
\(=x\left(x^3-1\right)+1997\left(x^2+x+1\right)\)
\(=x\left(x-1\right)\left(x^2+x+1\right)+1997\left(x^2+x+1\right)\)
\(=\left(x^2+x+1\right)\left[x\left(x-1\right)+1997\right]\)
\(=\left(x^2+x+1\right)\left(x^2-x+1997\right)\)
b) \(x^2-x-2015.2016\)
\(=x^2-2016x+2015x-2015.2016\)
\(=\left(x^2-2016x\right)+\left(2015x-2015.2016\right)\)
\(=x\left(x-2016\right)+2015\left(x-2016\right)\)
\(=\left(x-2016\right)\left(x+2015\right)\)