The equation f(x,y,z)=0 defines a 2D surface in 3D space. Fixing z to be constant at some value z' focuses us on the intersection of that surface with the plane z=z'. That intersection will be a 1D curve ##\gamma##, which can be parameterised as (##\gamma_x(t), \gamma_y(t), \gamma_z(t))## where ##\gamma_z(t)## is identically equal to z' and we have ##f(\gamma_x(t),\gamma_y(t),z')=0##. By the Implicit Function Theorem, in the vicinity of any point (x,y,z) this defines functions ##g,h## such that ##y=g(x)## and ##x=h(y)##. Then ##\left(\frac{\partial x}{\partial y}\right)_z = h'## and
##\left(\frac{\partial y}{\partial x}\right)_z = g'##.
By the inverse function rule of basic calculus, we know that ##g'(x) = 1/h'(y)##. So that gives us the desired result.
The result can be generalised. When f is a function of n variables (##n\geq 3##), the equation ##f(x_1,...,x_n)=0## defines an ##(n-1)##-dimensional hypersurface in n-dimensional space. Fixing the values of all but two of the variables, say ##x_3=x'_3, \ ...,\ x_n=x'_n## defines a 2D 'plane' in the n-D space. The intersection of that 2D 'plane' with the hypersurface will again be a curve. Why? because we have n variables and n-1 equations, being the n-2 constraints that set the values ##x_3,...,x_n##, together with the equation that defines the hypersurface. So we have only one degree of freedom - our solutions have one free dimension and a 1D thing is a curve. The curve can be parameterised as (##\gamma_1(t), \gamma_2(t), \gamma_3(t),...\gamma_n(t))## where ##\gamma_1(t),\gamma_2(t)## give the x and y coordinates, and for ##j>2,\ \gamma_j(t)## is identically equal to ##x'_j##.
By the Implicit Function Theorem again, this defines functions ##g,h## such that ##x_2=g(x_1)## and ##x_2=h(x_1)##. The result follows in the same way as above, just replacing ##x## by ##x_1##, ##y## by ##x_2## and the subscript ##z## by ##x_3,...,x_n##.