`a)`
`A=(x^2+x+1)(x^2+x+2)-12`
Đặt `t=x^2+x+1` khi đó `A` trở thành :
`t(t+1)-12=t^2+t-12`
`=t^2-3t+4t-12`
`=t(t-3)+4(t-3)`
`=(t+4)(t-3)`
`=(x^2+x+1+4)(x^2+x+1-3)`
`=(x^2+x+5)(x^2+x-2)`
`=(x^2+x+5)(x^2-x+2x-2)`
`=(x^2+x+5)[x(x-1)+2(x-1)]`
`=(x^2+x+5)(x+2)(x-1)`
`b)`
`B=(x^2+x)^2-2(x^2+x)-15`
Đặt `t=x^2+x` khi đó `B` trở thành :
`t^2-2t-15=(t^2-2t+1)-16`
`=(t-1)^2-4^2`
`=(t-1-4)(t-1+4)`
`=(t-5)(t+3)`
`=(x^2+x-5)(x^2+x+3)`