\(a^6-a^4+2a^3+2a^2\)
\(\Rightarrow a^2.\left(a^4-a^2+2a+2\right)\)
\(\Rightarrow\) \(a^2.\left(a^2.\left(a^2-1\right)+2\left(a+1\right)\right)\)
\(\Rightarrow a^2.\left(a^2.\left(a-1\right).\left(a+1\right)+2\left(a+1\right)\right)\)
\(\Rightarrow a^2.\left(a+1\right)\left(a^2.\left(a-1\right)+2\right)\)
\(\Rightarrow a^2.\left(a+1\right).\left(a^3-a^2+2\right)\)
\(\Rightarrow a^2.\left(a+1\right).\left(a^3+a^2-2a^2+2\right)\)
\(\Rightarrow a^2.\left(a+1\right).\left(a^2.\left(a+1\right)-2\left(a^2-1\right)\right)\)
\(\Rightarrow a^2.\left(a+1\right).\left(a^2.\left(a+1\right)-2\left(a-1\right).\left(a+1\right)\right)\)
\(\Rightarrow a^2.\left(a+1\right).\left(a+1\right).\left(a^2-2\left(a-1\right)\right)\)
\(\Rightarrow a^2.\left(a+1\right).\left(a+1\right).\left(a^2-2a+2\right)\)
\(\Rightarrow a^2.\left(a+1\right)^2.\left(a^2-2a+2\right)\)