\(a^7-a^5+2a^3+2a^2\\ =a^5\left(a^2-1\right)+2a^2\left(a+1\right)\\ =a^5\left(a-1\right)\left(a+1\right)+2a^2\left(a+1\right)\\ =a^2\left(a+1\right)\left(a^4-a^3+2\right)\)
\(a^7-a^5+2a^3+2a^2=a^5\left(a^2-1\right)+2a^2\left(a+1\right)\)
\(=\left(a+1\right)\left[a^5\left(a-1\right)+2a^3\right]\)
\(=a^3\left(a+1\right)\left[a^2\left(a-1\right)+2\right]\)
\(=a^3\left(a+1\right)\left(a^3-a^2-2\right)\)