Xy(x-y)-xz(y-z)-xz(x-y)+yz(y-z)=xy(x-y)-xyz+xz²-x²z+xyz+y²z-yz²=
=xy(x-y)-(x-y)(xz+yz-z²)=(x-y)(xy-xz+yz-z²)=(x-y)(y(x-z)-z(x-z))=
=(x-z)(y-z)(x-y)
(A-X)(X-Y)(Y+X+A)-(Y-X)(X-A)(Y-X-A)=((A-X)(X-Y))((A+X+Y)+A+X-Y)=
=(A-X)(X-Y)(A+X+Y+A+X-Y)=2(A-X)(X-Y)(X+A)