I'm trying to prove the following:
Let $$ R = \left\{\frac{f(x)}{g(x)}\mid f(x),g(x)\in\mathbb{Q}[x], g(x)\not=0\right\}\subseteq\mathbb{Q}(x). $$ Show that $R$ is a principal ideal domain.
My approach was to first prove that for any integral domain $S$ we have $$ \begin{equation} \text{Frac}(S[x])\cong\text{Frac}(S)(x) \end{equation} $$ and so $R\cong\mathbb{Q}(x)$, hence it's a field and so a PID. But I couldn't come up with a proof of this statement. Is this the right approach or is there a better way?