\[a^{7} + a^{5} - 2a^{2} - 2 =\]
\[= a^{5}\left( a^{2} + 1 \right) - 2 \cdot \left( a^{2} + 1 \right) =\]
\[= (a^{2} + 1)(a^{5} - 2)\]