a^2+3a+1=0
a^2+3a=-1
3a^3+(a^2+5)(a^2-1)-a(5a+6)
=3a^3+a^4+4a^2-5-5a^2-6a
=a^4+3a^3+4a^2-5-5a^2-6a
=a^2(a^2+3a)+4a^2-5-5a^2-6a
=-a^2+4a^2-5-5a^2-6a
=-2a^2-6a-5
=-2(a^2+3a)-5
=-2*(-1)-5
=2-5
= -3
a^2+3a+1=0
a^2+3a=-1
3a^3+(a^2+5)(a^2-1)-a(5a+6)
=3a^3+a^4+4a^2-5-5a^2-6a
=a^4+3a^3+4a^2-5-5a^2-6a
=a^2(a^2+3a)+4a^2-5-5a^2-6a
=-a^2+4a^2-5-5a^2-6a
=-2a^2-6a-5
=-2(a^2+3a)-5
=-2*(-1)-5
=2-5
= -3