For a commutative ring $R$ with $1\neq 0$ and a nonzerodivisor $r \in R$, let $S$ be the set $S=\{r^n\mid n\in \mathbb{Z}, n\geq 0\}$ and denote $S^{-1}R=R\left[\frac{1}{r}\right]$. Prove that there is a ring isomorphism $$R\left[\frac{1}{r}\right]\cong \frac{R[x]}{(rx -1)}.$$
I'm thinking maybe I can find a homomorphism from $R[x]$ to $R\left[\frac{1}{r}\right]$ that has kernel $(rx-1)$, and then use the first isomorphism theorem. Is this the right approach?
You should note that $\frac{1}{r}$ has the property $\frac{1}{r}\cdot r=1$. That is, $\frac{1}{r}$ is not just an indeterminate object like $x$. Conceptually, this isomorphism should be easy to construct. Send $s\in R$ to itself for all $s$. Send $x\mapsto \frac{1}{r}$. This is clearly a surjective homomorphism $$ R[x]\xrightarrow{\phi} S^{-1}R.$$ Calculate $\ker\phi$. You will see that it is $(rx-1)$. Conclude using the first isomorphism theorem.