A^3+3A^2-4
=(A^3-A^2)+(4A^2-4)
=A^2(A-1)+4(A^2-1)
=A^2(A-1)+4(A+1)(A-1)
=(A-1)[A^2+4(A+1)]
=(A-1)(A^2+4A+4)
=(A-1)(A+2)^2