The assumptions is that z is a function of both x and y, that is
$\displaystyle z(x,y) \implies f(x,y,z(x,y),a,b)=0$
Now just use the chain rule
$\displaystyle \frac{\partial }{\partial }f(x,y,z(x,y),a,b)= \frac{\partial f}{\partial x}\frac{\partial x}{\partial x}+\frac{\partial f}{\partial y}\frac{\partial y}{\partial x}+\frac{\partial f}{\partial z}\frac{\partial z}{\partial x}+\frac{\partial f}{\partial a}\frac{\partial a}{\partial x}+\frac{\partial f}{\partial b}\frac{\partial b}{\partial x}=0 $
This reduces to
$\displaystyle \frac{\partial }{\partial x}f(x,y,z(x,y),a,b)= \frac{\partial f}{\partial x}+\frac{\partial f}{\partial z}\frac{\partial z}{\partial x} =0$