How to show that $p \nmid a \Rightarrow \gcd(p,a)=1$?
If we have canonical representations of $p= q_1^{b_1} \cdots q_n^{b_n}$ and $a= r_1^{c_1} \cdots r_k^{c_k}$, then because $p \nmid a$, $q_i \neq r_j$ for all $i=1, \dots, n$ and $j=1, \dots k \Rightarrow \gcd(p,a)=1$.