Composition of non-constant polynomial and a non-constant rational function This question is related to one I asked here.
In this case, however, I need to prove that if $f \in F[x]$ (where $F$ is a field) is a non-constant polynomial, and $q \in F(x)$ is a non-constant rational function (so $q \notin F$), then $f(q)$, which is what I get if I substitute the rational function $q$ in for $x$ whenever it appears in the expression for $f$, is a non-constant rational function.
This is what I did:

Suppose that $f \in F[x]$ is a non-constant polynomial, so that $f(x):=\lambda_{n}x^{n} + \lambda_{n-1}x^{n-1} + \cdots + \lambda_{0}$ for $\lambda_{n} \neq 0$.
Suppose also that $q \in F(x)$ is a non-constant rational function, so that $\displaystyle q(x) = \frac{g(x)}{h(x)}$ where $g(x)$, $h(x)$ are $\in F[x]$, and $\gcd(g,h) = 1$. Say that $g(x):=\mu_{m}x^{m}+\mu_{m-1}x^{m-1}+\cdots + \mu_{0}$ and $h(x):=\nu_{k}x^{k}+\nu_{k-1}x^{k-1}+\cdots + \nu_{0}$, $h(x) \neq 0$.
Then, $\displaystyle f(q(x)) = f \left(\frac{g(x)}{h(x)} \right) = \lambda_{n}\left( \frac{g(x)}{h(x)}\right)^{n} + \lambda_{n-1}\left(\frac{g(x)}{h(x)} \right)^{n-1}+ \cdots + \lambda_{0}$.
Now, we have three cases:
  
  
*
  
*Case 1: Suppose $\mu_{m} \neq 0$ but $\nu_{k} = 0$. Since $h(x) \neq 0$, we have at least that $h(x)$ is a constant polynomial, but since $\gcd(g,h) = 1$, $h$ is not a constant that divides all the coefficients of $g$.
  
  
  Then, the highest order term (this true?) is $$ \lambda_{n}\mu_{m}^{n}\nu_{0}^{-n}x^{mn} = \lambda_{n} \left(\frac{\mu_{m}}{\nu_{0}} \right)^{n}x^{mn} $$ And $\lambda_{n}\left(\frac{\mu_{m}}{\nu_{0}} \right)^{n} \neq 0$, so $f(q)$ is a non-constant rational function. 

  
*Case 2: Suppose $\mu_{m}=0$ but $\nu_{k} \neq 0$. Since $q$ must be non-constant, $g(x) \neq 0$. Further, since $g(x) \neq 0$, we have at least that $g(x) $ is a (nonzero) constant polynomial but since $\gcd(g,h) = 1$, $g$ is not a constant that divides all the coefficients of $g$.
  
  
  Then, we have that $$f(q) = f\left( \frac{g}{h}\right) = \lambda_{n} \left( \frac{\mu_{0}}{\nu_{k}x^{k} + \cdots + \nu_{0}} \right)^{n} + \lambda_{n-1} \left(\frac{\mu_{0}}{\nu_{k}x^{k}+ \cdots + \nu_{0}} \right)^{n-1} + \cdots + \lambda_{0}  = \lambda_{n}\mu_{0}^{n}(\nu_{k}x^{k}+\cdots \nu_{0})^{-n} + \lambda_{n-1}\mu_{0}^{n-1} (\nu_{k}x^{k}+\cdots \nu_{0})^{-(n+1)} + \cdots + \lambda_{1}\mu_{0}(\nu_{k}x^{k}+\cdots \nu_{0})^{-1}+\lambda_{0}$$
And (this true?) from the $\lambda_{1}\mu_{0}(\nu_{k}x^{k}+\cdots \nu_{0})^{-1} = \frac{\lambda_{1}\mu_{0}}{\nu_{k}x^{k}+\cdots + \nu_{0}}$ term, we see that $f(q)$ is not constant. So, $f(q)$ is a non-constant rational function.

  
*Case 3: Suppose $\mu_{m} \neq 0$ and $\nu_{k} \neq 0$. Then $$f(q) = \left( \frac{g}{h}\right) = \lambda_{n} \left(\frac{\mu_{m}x^{m} + \mu_{m-1}x^{m-1} + \cdots + \mu_{0}}{\nu_{k}x^{k}+\nu_{k-1}x^{k-1}+ \cdots + \nu_{0}} \right)^{n} + \lambda_{n-1} \left(\frac{\mu_{m}x^{m} + \mu_{m-1}x^{m-1} + \cdots + \mu_{0}}{\nu_{k}x^{k}+\nu_{k-1}x^{k-1}+ \cdots + \nu_{0}} \right)^{n-1} + \cdots + \lambda_{1} \left(\frac{\mu_{m}x^{m} + \mu_{m-1}x^{m-1} + \cdots + \mu_{0}}{\nu_{k}x^{k}+\nu_{k-1}x^{k-1}+ \cdots + \nu_{0}} \right) + \lambda_{0} $$
  
  
  Now, my thoughts were to look at the $\mu_{n}$ term above, which includes $\displaystyle \frac{\lambda_{n}\mu_{m}^{n}x^{mn}}{(\nu_{k}x^{k}+\nu_{k-1}x^{k-1}+ \cdots + \nu_{0})^{n}}$, and to use this somehow to show that since one of the terms with variables that don't cancel each other out has a nonzero coefficient. The difficulty is making sure that I haven't missed any cases.

Indeed, I am worried that I have not taken into consideration all possible cases, and with the last case, case 3, I am overwhelmed with all the possibilities, and could really use some guidance as to 1) what the possibilities are and 2) how to most efficiently approach taking care of them.
I thank you ahead of time for your help, time, and patience.
 A: Just note that $$f\left(\frac {g(x)}{h(x)}\right)=\frac{\lambda_ng(x)^n+\lambda_{n-1}g(x)^{n-1}h(x)+\ldots+\lambda_1g(x)h(x)^{n-1}+\lambda_0h(x)^n}{h(x)^n}. $$
For $n\ge1$ nad $\lambda_n\ne0$, the numerator is not a multiple of $h(x)$ (and even less so a multiple of $h(x)^n$) because the first summand is not and all others are.
A: This follows from the fact that unique factorisation domains are integrally closed.
Short. Let $R = F[X]$ and $Q = F(X)$. Then $R$ is a unique factorisation domain with quotient field $Q$. This implies: For any non-zero, monic $f ∈ R[Z]$ and any $q ∈ Q$, if $f(q) = 0$, then $q ∈ R$.
Now, you can interpret any non-zero $f ∈ F[X]$ with $f(q) = 0$ as being some $f ∈ R[Z]$ with $f(q) = 0$ (by replacing the formal variable “$X$” by “$Z$”). Make it monic. What follows is that $f(q) = 0$ implies $q ∈ F[X]$ and then, if $q$ is non-constant, $f(q) ≠ 0$ really (by the statement in the question you linked).

Here’s an explicit proof for this for our special situation:

Let $f ∈ F[X]$, say $f = a_nX^n + … + a_0$. Let $q ∈ F(X)$.
Assume $f(q) = 0$. Write $q = \frac r s$ for some $r, s ∈ F[X]$ with $s ≠ 0$.
  Put $R = F[X]$ and let
  $$g = a_nZ^n + a_{n-1}sZ^{n-1} + … + a_1s^{n-1}Z+ a_0s^n$$
  So $g ∈ R[Z]$. Then $f(q) = 0$ implies $g(r) = 0$ because the latter equation is $s^nf(q) = 0$ and, since $s ≠ 0$, we can cancel. However, $g(r) = 0$ implies $s \mid a_nr^n$ in $F[X]$ (by repositioning $a_nr^n$).
Now we may assume that $a_n ≠ 0$. As $R$ allows unique factorisation, we may also assume $r$ and $s$ to be coprime, that is – sharing no common prime divisor. However, this contradicts $s \mid a_nr^n$ as $a_n ≠ 0$ implies $a_n ∈ F^×$ – unless $s$ itself has no prime divisors: Then $s$ must be constant and $q ∈ F[X]$.

A: Here is a totally different approach from yours.  The key trick (which is often useful for questions involving polynomials) is that to show a polynomial in one variable over a domain is $0$, you only have to show that it has infinitely many roots.
Let us assume $q(x)=g(x)/h(x)$ is not a constant but $f(q(x))=c$ is a constant, and show that then $f$ must be a constant (in fact, we will show that $f(x)=c$).  To prove this, note that if $a\in F$ is such that $q(a)$ is defined (that is, $h(a)\neq 0$), then $q(a)$ is a root of the polynomial $f(x)-c$.  So to prove that $f(x)-c=0$ and so $f(x)=c$ is a constant, it suffices to show that there are infinitely many different values of $q(a)$.
In proving this, we might immediately run into a problem: if our field $F$ is finite, then there are only finitely many choices of $a$ at all.  To fix this, we can just replace $F$ by some infinite extension field.  So we may assume without loss of generality that $F$ is infinite.
Now note that for any $b\in F$, $q(a)=b$ means $g(a)=bh(a)$.  Since $q$ is not a constant, the polynomial $g(x)-bh(x)$ is not zero (otherwise $q$ would be $b$), so it has only finitely many roots.  So for any $b\in F$, there are only finitely many $a\in F$ such that $q(a)=b$.  There are also only finitely many $a\in F$ such that $q(a)$ is undefined (namely, the roots of $h$).  So since $F$ is infinite, there must be infinitely many different values of $q(a)$, as desired.
