(a^{2}+1)^{2}-7(a^{2}+1)+10
ans = Its wrong I tried a^{4}-1+7a^{2}+16
There are no radicals here. Did you make a mistake when typing the problem?
Anyway, this is a quadratic in form. Let $\displaystyle u=a^2+1$. Then
$\displaystyle \left(a^2+1\right)^2-7\left(a^2+1\right)+10 = u^2-7u+10$.
Now factor that trinomial on the right, and then substitute for $\displaystyle u$ to get everything back in terms of $\displaystyle a$.
Did you not read what I wrote? We have a quadratic in $\displaystyle a^2+1$. You don't need to multiply everything out. And if you were to multiply everything out, you're doing it wrong: $\displaystyle \left(a^2+1\right)^2\neq a^4+1$.
I've shown you how to reduce the problem to factoring $\displaystyle u^2-7u+10$. Can you factor this trinomial?