If $a,b$ is an $R$-sequence, then $ax-b$ is prime (Eisenbud, Exercise 10.4)
Solution 1:
Hint $\ $ The following theorem applies.
Theorem $\ $ Suppose that $\,D\,$ is a domain, and $\,0\ne a,b \in D\,$ satisfy $\,a,b\mid e\, \color{#c00}\Rightarrow\, ab\mid e\,$ for all $\,e \in D.\,$ Then $\, f = ax+b\,$ is prime in $\,D[x].$
$\quad$ Lemma $\,\ d\mid cf\ \Rightarrow\, d\mid c,\ $ for all $\ 0\ne c,d\in D,\ $ i.e. $\,f\ $ is superprimitive.
$\quad$ Proof $\,\ d\mid c(ax\!+\!b)\, \Rightarrow\, d\mid ac,bc\,\Rightarrow\, a,b\mid abc/d\,\color{#c00}\Rightarrow\, ab\mid abc/d \,\Rightarrow\, d\mid c\ \ $ QED
Proof $\ $ If $\,f\,$ is not prime, $\,f\mid hk,\,\ f\nmid h, k\,$ for some $\,h,k \in D[x].\,$ Let $\,K\,$ be the fraction field of $\,D.\,$ Since $\,K[x]\,$ is a UFD, $\,f\,$ irreducible $\,\Rightarrow\, f\,$ prime, so $\,f\mid hk\, \Rightarrow\ f\mid h\,$ or $\,f\mid k.\,$ Wlog let $\,f\mid h\,$ in $\,K[x],\,$ so $\, h/f = g/d,\,$ for some $\,g \in D[x],\,\ 0\ne d \in D,\,\ d\nmid g\,$ in $\,D[x].\,$ Also $\,d\nmid f\ $ by $\,c = 1\,$ in the Lemma. Hence $\,fg = dh\,$ implies $\,f\,$ is a zero-divisor in $\,(D/d)[x].\,$ Hence by McCoy's theorem $\,cf = 0\,$ for some $\,0\ne c\in D/d,\ $ so $\ d\mid cf,\,\, d\nmid c,\,$ contra Lemma. $\ $ QED
The above proof is easily extended to the following polynomial primality criterion
$\quad f\,$ is prime in $\,D[x] \iff\!\underbrace{f\,\ \rm is\ prime\ in\ K[x]}_{\large\iff f\rm\ is\ irreducible\quad }\!$ and $\,f\,$ is superprimitive.
For further results on superprimitivity and Gauss' Lemma see e.g. Hwa Tsang Tang, Gauss' Lemma, Proc. Amer. Math. Soc. 35 (1972) 372-376 (summary of her thesis under Kaplansky).
Solution 2:
Here's the general statement:
Let $R$ be any ring, and $a, b \in R$ a weak regular sequence, i.e. $a$ is a nonzerodivisor and $(a) : (b) = (a)$. Then the $R$-algebra map $\phi : R[x] \to R[\frac{1}{a}]$, $x \mapsto \frac{b}{a}$, has $\ker \phi = (ax - b)$.
The proof consists of three steps:
1) Certainly $(ax - b) \subseteq \ker \phi$. If $(ax - b) \subsetneq \ker \phi$, then there exists $g \in \ker \phi \setminus (ax - b)$, of minimal degree with respect to not being contained in $(ax - b)$. Since $a$ is a nonzerodivisor, $\ker \phi$ contains no constants, so $g(x) = c_nx^n + \ldots + c_0$, where $n \ge 1$.
2) $c_n \not \in (a)$. If not, then $d := \frac{c_nb}{a}$ is a well-defined element of $R$ (since $a$ nonzerodivisor), and $0 = g(\frac{b}{a}) = c_n(\frac{b}{a})^n + c_{n-1}(\frac{b}{a})^{n-1} + \ldots + c_0 = (d + c_{n-1})(\frac{b}{a})^{n-1} + \ldots + c_0$. Thus $h(x) := (d + c_{n-1})x^{n-1} + \ldots + c_0$ is in $\ker \phi$ of strictly smaller degree than $g$ (since $n \ge 1$), so $h(x) \in (ax - b)$, and thus $g = h + c_nx^n - dx^{n-1} = h + \frac{c_n}{a}x^{n-1}(ax - b) \in (ax - b)$.
3) However, $0 = c_n(\frac{b}{a})^n + \ldots + c_0 \implies -c_nb^n = c_{n-1}b^{n-1}a + \ldots + c_0a^n \in (a)$, and $(a) : (b) = (a) \implies (a) : (b^n) = (a)$, so $c_n \in (a) : (b^n) = (a)$, in contradiction to (2).
Solution 3:
$R$ is an integral domain, and therefore has a quotient field $K$. Now just to illustrate take the case where $a=1$ then if $x-b\mid p(x)r(x)$ we have $p(b)r(b)=0$ and so one of them is zero, say $p(b)=0$ and then $x-b\mid p(x)$ in $R[x]$.
Now consider the general case if $ax-b\mid p(x)r(x)$ then in $K[x]$ we have
$x-\frac{b}{a}\mid p(x)r(x)$ so by the above argument we have say, $p(\frac{b}{a})=0$.
I claim in general that there are natural number $n$, $q(x)\in R[x]$ and $r \in R$ such that $a^np(x)=(ax-b)q(x)+r$. The proof is by induction on the degree on $p$. Let $cx^k$ be the leading term of $p(x)$ consider $ap(x)-cx^{k-1}(ax-b)$ this has lower degree and applying induction to this gives our result immediately.
It is now clear to see that if $p(\frac{b}{a})=0$ then $r$ is zero.
Assume now that $n$ is minimal such that $$a^np(x)=(ax-b)q(x)$$ with $q(x) \in R[x]$. If $n=0$ we are done so for $n\ge1$ we derive a contradiction by showing that $q$ is divisible by $a$.
Now if we look in the ring $R/(a)$ we have
$bq(x)=0$ and since $b$ is not a zero divisor in $R/(a)$ this means that $q(x)=0$ in $R/(a)$ and therefore $q$ is divisible by $a$.
Therefore we have in fact, $$p(x)=(ax-b)q(x)$$ verifying that $ax-b$ is prime.