x³+y³+z³-3xyz=(x+y)³-3x²y-3xy²+z³-3xyz
=(x+y)³+z³-(3x²y+3xy²+3xyz)
=(x+y+z)[(x+y)²-(x+y)z+z²]-3xy(x+y+z)
=(x+y+z)[(x+y)²-(x+y)z+z²-3xy]
=(x+y+z)(x²+2xy+y²-xz-yz+z²-3xy)
=(x+y+z)(x²+y²+z²-xy-xz-yz)
x³+y³+z³-3xyz=(x+y)³-3x²y-3xy²+z³-3xyz
=(x+y)³+z³-(3x²y+3xy²+3xyz)
=(x+y+z)[(x+y)²-(x+y)z+z²]-3xy(x+y+z)
=(x+y+z)[(x+y)²-(x+y)z+z²-3xy]
=(x+y+z)(x²+2xy+y²-xz-yz+z²-3xy)
=(x+y+z)(x²+y²+z²-xy-xz-yz)