x(x+1)(x^2+5x+6)-8
= x(x+1)(x+2)(x+3) - 8
= {x(x+3)}{x+1)(x+2)} - 8
= {x^2+3x}{x^2+3x+2} - 8
= (x^2+3x)^2 + 2(x^2+3x) - 8
= (x^2+3x+4)(x^2+3x-2)
x^2+5xy+x+3y+2y^2
= x^2+2xy+y^2+3xy+x+3y+y^2
= (x^2+2xy+y^2)+(3xy+x)+(3y+y^2)
= (x+y)^2 + x(3y+1)+y(3y+1)
= (x+y)^2 + (3y+1)(x+y)
=(x+y)(x+y+3y+1)
=(x+y)(x+4y+1)