The right way to use the chain rule for composite functions like $f(g(x,y),h(x,y))$ Im in doubt about a resolution. I made it in a way that gave me the right answer but I don't think it's the right way to answer. I wish some one can help me understand the right way to make.
So, $f:\Bbb{R}^2\rightarrow\Bbb{R}$ is a derivable function and $z = f(x-y,y-x)$ so what is the value of :$$\frac{\partial{z}}{\partial{x}} + \frac{\partial{z}}{\partial{y}}$$
The way I did was:
$$\frac{\partial{z}}{\partial{x}} = \nabla{f}.\bigg(\frac{\partial{(x-y)}}{\partial{x}},\frac{\partial{(y-x)}}{\partial{x}}\bigg) = \frac{\partial{f}}{\partial{x}} - \frac{\partial{f}}{\partial{y}} \Rightarrow\frac{\partial{f}}{\partial{y}} = 0$$
$$\frac{\partial{z}}{\partial{y}} = \nabla{f}.\bigg(\frac{\partial{(x-y)}}{\partial{y}},\frac{\partial{(y-x)}}{\partial{y}}\bigg) = \frac{\partial{f}}{\partial{y}} - \frac{\partial{f}}{\partial{x}}\Rightarrow\frac{\partial{f}}{\partial{x}} = 0$$
Is the way I did correct? Did the use of chain rule is correct?

Let’s try a concrete example: suppose we have $f:(x,y)\mapsto x^2+y^2$. Then $$z = f(x-y,y-x) = (x-y)^2+(y-x)^2=2(x-y)^2$$ and ${\partial z\over\partial x}=4(x-y)$, which is not identically zero.  
What went wrong with your calculations? You’ve made the common mistake of using the same names to mean different things, which I think is encouraged by the conventional notation you’re using. The $x$ and $y$ in $f(x,y)$ are not the same $x$ and $y$ that are in the expressions $x-y$ and $y-x$. Since the former are just placeholders, anyway, let’s call them $u$ and $v$ instead, and further, let’s give some names to the two unnamed functions, $\phi:(x,y)\mapsto x-y$ and $\psi:(x,y)\mapsto y-x$. We then have $z=f(\phi(x,y),\psi(x,y))$ and the chain rule says that \begin{align} {\partial z\over\partial x}(x,y) &= {\partial f\over \partial u}\left(\phi(x,y),\psi(x,y)\right) {\partial \phi\over\partial x}(x,y)+{\partial f\over\partial v}\left(\phi(x,y),\psi(x,y)\right) {\partial\psi\over\partial x}(x,y) \\ &= {\partial f\over \partial u}(x-y,y-x)-{\partial f\over\partial v}(x-y,y-x). \end{align} This is not in general identically zero. Similarly, $${\partial z\over\partial y}(x,y) = {\partial f\over\partial v}(x-y,y-x)-{\partial f\over\partial u}(x-y,y-x).$$ Their sum obviously vanishes.
