Let $K/F$ be a field extension. If $\alpha \in F(\alpha^m)$, $m > 1$, then $\alpha$ is algebraic in $F$.
A proof provided in the book is as follows:
Proof: Since $\alpha \in F(\alpha^m)$, there exists $f$ and $g$ in $F[x]$ such that $\alpha = \frac{f(a^m)}{g(a^m)}$. Therefore, $\alpha$ is the solution to the polynomial $h(x) := xg(x^m) - f(x^m)$. Suppose $\deg(f(x)) = s, \deg(g(x))=t$. Then $\deg(f(x^m)) = sm$ and $\deg(g(x^m)) = tm$. Since $m>1$, $ms \neq mt + 1$. Therefore, $h \neq 0$, showing that $\alpha \in F(\alpha^m)$.
My question: Why we have those $f$ and $g$ satisfies $a = \frac{f(a^m)}{g(a^m)}$? Does it imply that $s \neq t$?
The definition of $F(\alpha^m)$ is the set of quotients of polynomials in $\alpha^m$. We’re choosing two specific polynomials, $f$ and $g$, so that their quotient witnesses that $\alpha \in F(\alpha^m)$. That means $\alpha=\frac{f(\alpha^m)}{g(\alpha^m)}$. Your question uses $a$ here instead of $\alpha$. Perhaps that’s the source of your confusion.
It’s possible that $s=t$; that won’t affect the proof, which demonstrates that there’s a non-zero polynomial $h(x)=xg(x^m)-f(x^m)$ with the property $h(\alpha)=0$. The existence of that polynomial means (by the definition of algebraic) that $\alpha$ is algebraic over $F$.