Nonconstant polynomials have a composite value in a UFD with finitely many units

Solution 1:

You may find this clearer. First, $R$ is infinite, since finite domains are fields. Since the set of units $U$ is finite, $f$ takes some value $\,f(b) = \color{#c00}{a\not\in U\cup \{0\}}\,$ (else $f$ takes a values $\,v\in U\cup \{0\}$ infinitely many times, so $f-v$ has infinitely many roots, contra a nonzero polynomial over a domain has no more roots than its degree). Similarly $f(ax+b)$ takes some value $\,f(ar+b)\,$ not in $\,\color{blue}{aU\cup\{0\}}$. Note $\,a\mid f(ar+b)\,$ since $\,{\rm mod}\ a\!:\ f(ar+b)\equiv f(b) = a\equiv 0,\,$ hence $\,f(ar+b) = ac\,$ for $\,c\in R.\,$ By construction, $\,\color{#0a0}{c\not\in U\cup\{0\}}$ (else $\,f(ar+b) = ac\in \,\color{blue}{aU\cup\{0\}}).\,$ Therefore, since both $\,\color{#c00}a\,$ and $\,\color{#0a0}c\,$ are nonzero nonunits, we infer $\,ac = f(ar+b)\,$ is a composite value of $f$.