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