\(A=\left(a-x\right)y^3-\left(a-y\right)x^3-\left(x-y\right)a^3=B-\left(x-y\right)a^3\)
\(B=\left(a-x\right)y^3-\left(a-y\right)x^3=a\left(y^3-x^3\right)-xy^3+yx^3\)
\(B=xy\left(x^2-y^2\right)-a\left(x^3-y^3\right)=\left(x-y\right)\left[xy\left(x+y\right)-a\left(x^2+y^2+xy\right)\right]\)
\(A=\left(x-y\right)\left\{\left[xy\left(x+y\right)-a\left(x^2+y^2+xy\right)\right]-a^3\right\}\)