x2y + xy2 + x2z + xz2 + y2z + yz2 +3xyz
=(x2y+x2z)+(xy2+xz2)+(y2z+yz2)+3xyz
=x2(y+z)+x(y2+z2)+yz(y+z)+2xyz+xyz
=x2(y+z)+x(y2+z2+2yz)+yz(y+z+x)
=(y+z)x(x+y+z)+yz(y+x+z)
=(x+y+z)(xy+xz+yz)
x2y + xy2 + x2z + xz2 + y2z + yz2 + 3xyz
=(x2y + xy2 + xyz) + (x2z + xyz + xz2) + (xyz + y2z + yz2)
=xy(x + y + z) + xz(x + y + z) + yz(x + y +z)
=(x + y + z)(xy + xz + yz)