Suppose $\frac{a}{b}\in R\subseteq\mathbb{Q}$ is in lowest terms, and $p\mid b$. Then $\frac{a}{p}\in R$, of course, and because $\frac{a}{b}$ was in lowest terms, $\gcd(a,b)=1$, and hence $\gcd(a,p)=1$. Thus, there exists a $c\in\mathbb{Z}$ such that $ac\equiv 1\bmod p$, so $\frac{ac}{p}=n+\frac{1}{p}$ for some $n\in\mathbb{Z}$. Because $\frac{a}{p}\in R$ and $n\in R$ (any subring of $\mathbb{Q}$ has to contain $\mathbb{Z}$), we have that $\frac{1}{p}\in R$.
Thus, if $p$ occurs as the divisor of the denominator of any element of $R$, then $\frac{1}{p}\in R$. The converse is obvious. Thus, given a subring $R$, let $P=\{\text{primes not occurring as divisors of denominators of elements of }R\}=$ $\{\text{primes }p\text{ such that }\tfrac{1}{p}\notin R\}$ Given any $\frac{a}{b}\in\mathbb{Q}$ in lowest terms, if $\frac{a}{b}\in R$ then $p\nmid b$ for any $p\in P$. Thus, $R\subseteq R_P$.
Given any $\frac{a}{b}\in\mathbb{Q}$ in lowest terms, if $\frac{a}{b}\in R_P$ then we have that $p\mid b\implies p\notin P\implies \frac{1}{p}\in R$.
If $b=p_1^{a_1}\cdots p_k^{a_k}$ is the prime factorization of $b$, then because $\frac{1}{p_1},\ldots,\frac{1}{p_k}\in R$, we get that $\frac{a}{b}=a\cdot\left(\tfrac{1}{p_1}\right)^{a_1}\cdots\left(\tfrac{1}{p_k}\right)^{a_k}\in R$ so that $R_P\subseteq R$. Therefore, $R=R_P$.