a, 5xy3-2xyz-15y2+6z
=5xy3-15y2+6z-2xyz
=5y2(xy-3)-2z(xy-3)
=(xy-3)(5y2-2z)
b, x2(y-z)+y2(z-x)+z2(x-y)
=x2y-x2z+y2z-y2x+z2(x-y)
=x2y-y2x-x2z+y2z+z2(x-y)
=xy(x-y)-z(x2-y2)+z2(x-y)
=xy(x-y)-z(x-y)(x+y)+z2(x-y)
=(x-y)[xy-z(x+y)+z2]
=(x-y)(xy-zx-zy+z2)
=(x-y)(xy-zx-zy+z2)
=(x-y)[x(y-z)-z(y-z)]
=(x-y)(y-z)(x-z)