bijection between prime ideals of $R_p$ and prime ideals of $R$ contained in $P$ Given a ring $R$, I want to show that the localization of $R$ at the prime ideal $P$ of $R$ (denoted as $R_P$) is isomorphic to the set of prime ideals of $R$ contained in $P$. That is:

$$
\text{Spectrum}(R_P)\cong \{I\subseteq P \mid \text{$I$ is an ideal of $R$}\}
$$

From the statment, I can see that $Q\subseteq R_P$ is a prime ideal, then any $x\in Q$ is of the form $x=\frac{a}{b}$, where $a\in R$, but $b\notin P$, from the definition of $R_P$. But how can I show that each such $Q$ relates to an ideal of $R$ contained in $P$.
Sketch:

Let $\,i\colon R\to R_\mathfrak p$, $\,x\mapsto \dfrac x1$ be the canonical morphism. If $\mathfrak q\in\operatorname{Spec}R_{\mathfrak p}$, $\,\mathfrak p'=i^{-1}(\mathfrak q)$ is a prime ideal of $R$  contained in $\mathfrak p$.

It is straightforward to check the inverse  of this mapping is $\,.\mathfrak p'\mapsto \mathfrak p'R_\mathfrak p$
Proof for $Spec(R_P)\cong \{I\in Spec(R)|I\subseteq P \}$:
More generally, The book, "Steps in Commutative Algebra" by Sharp has:  

  

Consider $S=R-P$. 

Theorem 5.37 of the book  has similar result for even primary ideals.