Show that $R_P$ has a unique maximal ideal Problem is:


  Let $R$   be a commutative ring and let $P$   be a prime ideal. 
  
  (a) Prove that the set of non-units in $R_{P}$   is the ideal $P_{P}$.
  
  (b) Deduce that $R_{P}$   has a unique maximal ideal.


I tried (a) as:

Let $u$
  be a non-unit in $R_{p}$
  and $p$
  be any elements in $R_{p}.$
  Then, since $u$
  is not unit, $up\neq1$
  and $pu\neq1.$
  Suppose that $up$
  or $pu$
  is a unit in $R_{p}.$
  Then there exists $q$
  such that, say, $upq=1.$
  Then $u(pq)=1.$
  So, $u$
  is a unit in $R_{p}.$
  This is contradiction. So, the set of non-units in $R_{p}$
  is an ideal in $R_{P}.$

So, I have to show that the set of non-units is equal to $P_P$ and (b)

But I am stuck at this point.
The ideal $P_P$ is
$$
P_P=\left\{\frac{a}{s}: a\in P, s\in R\setminus P\right\}
$$
Let's prove that no element of $P_P$ is a unit. Suppose $a\in P$, $s\in S=R\setminus P$, $x\in R$ and $t\in S$ be such that
$$
\frac{a}{s}\frac{x}{t}=\frac{1}{1}
$$
By definition there exists $u\in S$ with $u(ax-st)=0$ or $uax=ust$. This is a contradiction because $uax\in P$, but $ust\in S$.

On the other hand, every element of $R_P$ not in $P_P$ is a unit. Indeed, if $a/s\notin P_P$, we have $a\notin P$, so $(a/s)^{-1}=s/a$.

Therefore the set of nonunits is an ideal and the ring is local, by general results. The maximal ideal is the set of nonunits, which we proved to be $P_P$.
Part (a) is Lemma 5.20 of the Sharp's book, "Steps in Commutative Algebra" (page 89):   



It is easy to see that $I$ is an ideal of $R_P$.
Sharp proves that $R_p\setminus I$ is the set of units. One direction is easy: for any $a/s\notin I,$ one has $a\in S$, so $\dfrac{a}{s}\dfrac{s}{a}=\dfrac{1}{1}.$
On the other hand, if $b/t$ is a unit, say $\dfrac{b}{t}\dfrac{c}{v}=\dfrac{1}{1},$ then there exists $w\in S$ such that $wbc=wtv\in R\setminus P.$ Hence $b\notin P,$ which means $b/t\notin I.$

For part (b), note that a ring is local if and only if the set of non-units of the ring is an ideal (this is lemma 3.13 of the book).