So first I show that $y$ is dependent on $x$. Let $f(x,y)=x^y+\sin y$ then $f_y=x^y\ln x+\cos y$ and $f_y(1,0)=1\neq0$.
So if we derive $f$ with respect to $x$ we get $x^yy'\ln x+y'\cos y=0\iff y'(x)=0$ but $y'(x)=\frac{-f_x}{f_y}=\frac{-yx^{y-1}}{x^y\ln x+\cos y}$.
I should always be able to use the formula and directly derive and get the same answer right? So what is wrong here?