(a^2+ma+8)(a^2-3a+n)
=a^4-3a^3+a^2*n+ma^3-3ma^2+mna+8a^2-24a+8n
=a^4+(m-3)a^3+(n-3m+8)a^2+(mn-24)a+8n
m-3=0 mn-24=0
m=3 n=8