Factorise: x3+6x2y+12xy2+9y3
x3+6x2y+12xy2+9y3
=x3+6x2y+12xy2+8y3+y3
={x3+3x2(2y)+3(x)(2y)2+(2y)3}+y3
=(x+2y)3+y3 [Since, a3+3a2b+3ab2+b3=(a+b)3]
=(x+2y+y)((x+2y)2−(x+2y)y+y2) [Since a3+b3=(a+b)(a2−ab+b2)]
=(x+3y)(x2+2x(2y)+(2y)2−xy−2y2+y2)
=(x+3y)(x2+4xy+4y2−xy−2y2+y2)
=(x+3y)(x2+3y2+3xy)
Hence, the correct option is B.