Describe units and maximal ideals in this ring 
If $p$ is a fixed prime integer, let $R$ be the set of all rational numbers that can be written in a form $\frac{a}{b}$ with $b$ not divisible by $p$. I need to describe all the units in $R$ and all maximal ideals in $R$.

$\mathbb{Z} \subset R$, because $n=\frac{n}{1}$ for every integer $n$. It also seems to me that $R$ is a PID, since the addition and multiplication operations are just usual addition and multiplication of rational numbers.
So if $\frac{a}{b} \in R$ and $p \nmid a$, then $\frac{a}{b}$ is a unit in $R$ since $\frac{a}{b} \cdot \frac{b}{a}=1_R$. Am I missing anything?
But how about maximal ideals in $R$?
 A: You have an example of something called a local ring, this is a ring with a unique maximal ideal. You are taking the ring $\mathbb{Z}$ and you are localizing at $(p)$. (In short, localization a ring $R$ at a prime ideal $I$ is just inverting everything that is outside of $I$. The fact that $I$ is prime tells us that $R\backslash I$ is multiplicatively closed, we write this $R_I$).
It is well known that in a local ring $R_I$ the unique maximal ideal is the ideal generated by $I$ in its localization, so in your case the unique maximal ideal will be generated by $(p)$, everything of the form $p\cdot\frac{a}{b}\in R$ (fractions whose numerator is a multiple of $p$). 
You could finish your problem using the following lemma: 
Lemma: If $R$ is a local ring with unique maximal ideal $I$, then $R\backslash I=R^\times$. 
Proof: Let $x$ be a unit. Then $x\notin I$ because the ideal generated by $x$ is $R$ and $I$ is maximal (in particular proper). Hence $x\in R\backslash I$.
Now let $x\in R\backslash I$, consider the ideal $(x)$. Assume for sake of contradiction that $x$ is not a unit, meaning that $(x)$ is proper. Hence, $(x)$ is contained in a maximal ideal, but there is only one such an ideal, so we get $(x)\subset I$, so $x\in I$, a contradiction with the fact that $x\in R\backslash I$, so we get that $(x)$ is not proper, meaning that $x$ is a unit. 
Using the above lemma you could finish your problem. You already found all the units. Hence you found $R\backslash I=R^\times=\{\frac{a}{b}: p\nmid a\}$, taking complements: $I=\{\frac{a}{b}:p\mid a\}$. 
Here is a reference if you want to see why localization at a prime ideal yields a local ring. 
A: If an element $\frac{a}{b}\in R$, with $p\nmid b$, is invertible, then there exists $\frac{c}{d}\in R$, with $p\nmid d$, such that $\frac{a}{b}\frac{c}{d}=1$; this means $ac=bd$. Since $p\nmid bd$, it follows that $p\nmid a$. Conversely, if $p\nmid a$ and $p\nmid b$, then $\frac{b}{a}\in R$.
Now we know the noninvertible elements: they are of the form $\frac{pa}{b}$ (with $p\nmid b$) and it's clear that the sum of noninvertible elements is again noninvertible. Therefore the noninvertible elements form an ideal.
In general, every noninvertible element belongs to (at least) a maximal ideal, because it generates a proper ideal; invertible elements, on the other hand, belong to no maximal ideal. So this ring $R$ has exactly one maximal ideal.
Since every noninvertible element is of the form $\frac{p}{1}x$ (for some $x\in R$), we can conclude that the unique maximal ideal is principal.
It's not difficult to extend the argument to show that an ideal $I$ of $R$ ($I\ne\{0\})$ is of the form $I=\frac{p^n}{1}R$, where $n$ is the least exponent such that $\frac{p^n}{1}\in I$.
Of course the argument using localizations is more general, but in this case a “proof by hand” is possible.
