Let `a^2-3a = x`
Then, our polynomial becomes,
`x(x+7)+10`
`=x^2+7x+10`
`=x^2+5x+2x+10`
`=(x+5)(x+2)`
`=(a^2-3a+5)(a^2-3a+2)`
Now, `a^2-3a+5` will have no factor as discriminant is `-11` that is less than `0`.
And, `a^2-3a+2 = a^2-2a-a+2 = (a-2)(a-1)`
So, factors of given polynomial are,
`(a^2-3a+5)(a-2)(a-1)`