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$.