I am trying (for self-study) to prove that given any prime $p$, a rational $q$ can be written as $m/n$ where at least one of $m,n$ is not divisible by $p$. This is implied immediately by the fact that $q$ can be written as a ratio of relatively prime integers, but that's part (b) of the problem, so I don't think I can use that fact. Here is my attempt at a proof. I'm trying my best to make the argument as formal as possible, but I think the argument is as simple as "cancel as many factors of $p$ as possible."
Let $q \in \mathbb{Q}$, and write $q = \frac{a}{b}$ where $a,b \in \mathbb{Z}$ and $b \neq 0$. Let $p$ be a prime number. We can then write $a = p^i s$ and $b = p^j t$ for some $i,j \geq 0$ and $s,t \in \mathbb{Z}$, where $p$ divides neither $s$ nor $t$. If $i = j$, then $$ \frac{a}{b} = \frac{p^i s}{p^j t} = \frac{s}{t}, $$ and the result is proved. If $i > j$, then $p^{i-j} \in \mathbb{Z}$, and it follows that $$ \frac{p^{i-j} s}{t} = \frac{p^{i-j} s}{t}\cdot \frac{p^j}{p^j} = \frac{p^i s}{p^j t} = \frac{a}{b} = q, $$ and the result is proved. Finally, if $i < j$, then $p^{j-i} \in \mathbb{Z}$, and we have $$ \frac{s}{p^{j-i} t} = \frac{s}{p^{j-i} t} \cdot \frac{p^i}{p^i} = \frac{p^i s}{p^j t} = \frac{a}{b} = q. $$
How does this look?