Calculating Spec of the localization $R_P$ I am studying a first course in commutative algebra and I'm currently working through some exercises on calculating $Spec(R_P)$, where $R_P = R[(R\backslash P)^{-1}]$ is the localization of $R$ at a prime ideal $P$.  Unfortunately, I'm not sure if I'm making much progress.
Here's one example:

$R = K[x,y]/(xy)$ ($K$ a field), and $P = (x-1, y)$.

My thinking is to creating a homomorphism $\phi : R_P \rightarrow R$ (which I think is injective), from which, I can induce a homomorphism of sets $\phi^* : Spec(R) \rightarrow Spec(R_P)$, which I also believe is injective, since $\phi$ is injective.
I tried calculating $Spec(R)$ and I think it is $\{ (x), (y) \}$.  This would suggest to me that $Spec(R_P)$ is formed of two ideals, and I think it would be $\{ (0), (x-1) \}$.  
As you can probably gather, I'm very unsure on all of this, but it's the best attempt I've got so far.  Any advice would be greatly appreciated; thanks!
 A: In general there's not a homomorphism $R_P \to R$.  There is a homomorphism $R \to R_P$ and this does induce a map $\mathrm{Spec} \ R_p \to \mathrm{Spec} \ R$.
For computing $\mathrm{Spec} \ R_P$ the following is an important theorem about localizations which you should try to prove yourself:
Theorem. If $S \subseteq R$ is any multiplicative set then the prime ideals of $S^{-1}R$ are in one-to-one correspondence with the prime ideals of $R$ that don't meet $S$.
(The maps for the correspondence are given by extending and contracting ideals through the natural map $R \to S^{-1}R$ given by $a \mapsto \frac{a}{1}$.)
Applying this to your situation it says that the prime ideals of $R_P$ correspond to the prime ideals of $R$ that are contained in $P$.  In your example you computed $\mathrm{Spec} \ k[x, y]/xy = \{(x), (y)\}$.  In fact it's $\mathrm{Spec} \ k[x, y]/xy = \{(x, f(y)), (y, g(x))\}$ where the $f$ and $g$ range over all irreducible polynomials as well as $0$.
To see this note that $xy = 0$ is contained in every prime ideal so every prime ideal contains either $x$ or $y$.  If it contains $x$ then it corresponds to a prime ideal of 
$$(k[x, y]/xy)/x \simeq k[x, y]/(x, xy) = k[x, y]/(x) \simeq k[y]$$
and the prime ideals of $k[y]$ are all of the form $(f)$ where $f$ is irreducible.  The argument for when $P$ contains $y$ is symmetric.
Now, $x$ is not contained in $P$ and $y$ is.  Note that $g(x)$ is contained in $P$ if and only if $x - 1$ divides $g(x)$.  As $g(x)$ is either $0$ or irreducible this means $g(x)$ is either $0$ or $x - 1$.
Thus $\mathrm{Spec} \ (k[x, y]/xy)_P = \{(y), (y, x - 1)\}$.
A: $R_P=k[x,y]_P/(xy)=k[x,y]_P/(y)\simeq k[x]_{(x-1)}$, and the last ring has clearly only two prime ideals: $(0)$ and $(x-1)k[x]_{(x-1)}$.
