Let $F$ be a field and $x$ transcendental over $F$. Let $y=f(x)/g(x)$ be a nonconstant rational function with relatively prime polynomials $f,g\in F[x]$. Prove $[F(x):F(y)]=\max(\deg f,\deg g)$.
My attempt: By replacing $y$ with $\frac{1}{y}$ if necessary we assume $\deg g\geq\deg f$. By the Euclid algorithm we assume $\deg g>\deg f$. Then $\deg g=\max(\deg f,\deg g)$, let $n=\deg g$. Let $R(t)$ be this polynomial $$R(t)=yg(t)-f(t)=\frac{f(x)}{g(x)}g(t)-f(t)$$ Then $\deg R=\deg g=n$ because $n=\deg g>\deg f$. The coefficients of $R(t)$ lie in $F(y)$ and hence $R(t)\in F(y)[t]$. Clearly $R(x)=0$.
Now I only have to prove $R(t)$ is actually the minimal polynomial of $x$ over $F(y)$. I believe the next step is to obtain a contradiction that $R(t)$ being reducible can lead to $f,g$ being not coprime, but I can't figure out how to do that.
P.S. A hint is preferred over a full answer.