(a) Let $p$ be prime and assume it does not divide $a$. Prove that $\gcd (a, p) = 1$.
(b) Prove that if $p$ and $q$ are distinct primes then $\gcd (p, q) = 1$.
(a) Let $g=\gcd(a,p)$. This means $g \mid a$ and $g \mid p$.
Since $p$ is prime, its only factors are 1 and $p$. That means $g$ is either 1 or $p$.
Let's consider the possibility of $g=p$. Since $g \mid a$, we have $p \mid a$. But we are given that $p$ does not divide $a$. So $g \neq p$.
This leaves only $g=1$ as the only possibility, that is $\gcd(a,p)=1$.
(b) Let $g=\gcd(p,q)$. Tis means $g \mid p$ and $g \mid q$.
Since $p$ is prime, its only factors are 1 and $p$. That means $g$ is either 1 or $p$.
Since $q$ is prime, its only factors are 1 and $q$. That means $g$ is either 1 or $q$.
We're given $p$ and $q$ are distinct, so $g=1$ is the only possibility. That is, $\gcd(p,q)=1$.