2 \(x^7+x^5+1=x^7+x^6+x^5-x^6+1=x^5\left(x^2+x+1\right)-\left(x^6-1\right)=x^5\left(x^2+x+1\right)-\left(x^3-1\right)\left(x^3+1\right)\)
\(=x^5\left(x^2+x+1\right)-\left(x-1\right)\left(x^2+x+1\right)\left(x^3+1\right)=\left(x^2+x+1\right)\left(x^5-\left(x-1\right)\left(x^3+1\right)\right)\)
\(=\left(x^2+x+1\right)\left(x^5-x^4+x^3-x+1\right)\)
1 \(x^3-5x^2+3x+9=x^3+x^2-6x^2-6x+9x+9=x^2\left(x+1\right)-6x\left(x+1\right)+9\left(x+1\right)\)
\(=\left(x^2-6x+9\right)\left(x+1\right)=\left(x-3\right)^2\left(x+1\right)\)