Prime ideals in $R[x]$, $R$ a PID 
Let $R$ be a PID. Show that if $\mathfrak p \subset R[x]$ is a prime ideal, $(r) = \left\{h(0) \colon h(x) \in \mathfrak p \right\}$, and $$\mathfrak p = (r, f(x), g(x)),$$ where $f(x), g(x) \in R[x]$ are nonconstant irreducible polynomials, then $f(x)$ and $g(x)$ are associates. So $\mathfrak p = (r, f(x))$.  

 A: After seeing the comments below I see that 
1)[most importantly] my answer was clearly wrong
2) the OP question cannot be solved as the counterexample of user26857 shows: $(2,x,x+2)=(x,2)=\{h(x) \in \mathbb Z[x] \mid h(0)=2\}$, so $r=2$ and $x$ and $x+2$ are not associated.
Since the OP aims seems to be following 

I am trying to solve an exercise to show that every prime ideal in R[x] is of the form (r,f(x))

as amend I'll give a sketch of a possible solution to the problem. 
The idea is to consider for a generic prime $p$ in $R[x]$ the ideal $p'=p \cap R$ which is prime in $R$. Since $R$ is a PID we have two possibilities


*

*$p'=(0)$: in this case one can consider an irreducible polynomial $f$ of minimal degree in $p$ (this polynomial exists as a consequence of the primality of $p$). The one can consider a generic $g \in p \setminus \{0\}$ and the ideal $(f,g)$ in $K(R)[x]$ proving that $(f,g)=(f)$ in $K(R)[x]$ and then using Gauss Lemma to conclude that $p=(f)$.

*$p'=(r)$ for some $r \ne 0$: in this case $R[x]/p \cong (R[x]/(r))/(p/(r))$. Up to the isomorphism $R[x]/(r) \cong R/(r)[x]$ we have that $R/(r)$ is a field (because $(r)$ is a not null prima ideal of a PID, hence it is maximal) so $p/(r)$ is principal ($R/(r)[x]$ is a PID, indeed an Euclid ring) and so it is generated by the image of a polynomial $f \in R[x]$ under the homomorphism $R[x] \to R/(r)[x]$.
Since $p/(r)=(\bar f)$ by the theorem on ideals of quotient rings $p=(r,f)$, of course the case $f=0$ is contemplated.


The hardest part to work out is the first one ($p'=(0)$) because the details are a little boring but it is an easy exercise, feel free to ask if something does not add up.
A: As stated, the claim being made in the post is false, as user26857 makes clear in the comments. To reiterate, a counterexample is $$\mathfrak{p} = (2, x, x+2) \subset \mathbf{Z}[x].$$
