\(=\dfrac{\left(x+y\right)^3+z^3-3xy\left(x+y\right)-3xyz}{\left(x-y\right)^2+\left(y-z\right)^2+\left(x-z\right)^2}\)
\(=\dfrac{\left(x+y+z\right)\left(x^2+2xy+y^2-xz-yz+z^2\right)-3xy\left(x+y+z\right)}{2\left(x^2+y^2+z^2-xy-xz-yz\right)}\)
\(=\dfrac{\left(x+y+z\right)\left(x^2+y^2+z^2-xy-xz-yz\right)}{2\left(x^2+y^2+z^2-xy-xz-yz\right)}\)
\(=\dfrac{x+y+z}{2}\)