I have a question about an exercise in Dummit-Foote Abstract algebra:
This is the exercise-solution I am referring to:
My question is about problem 3's solution of $\implies$ direction. I am trying to figure out why do we assume in that proof that $a$ and $b$ are relatively prime. I don't see that this assumption is used anywhere in the proof.

You are right, that assumption has to be dropped, otherwise the proof will only give that $k$ is a prime power.
In what is possibly a critical passage, $\gcd(a,n)=\gcd(b,n)=1$ implies $\gcd(ab,n)=1$ without any need to assume $\gcd(a, b) = 1$. This is just, for instance, because if $p$ is a prime dividing both $a b$ and $n$, then $p$ divides either $a$ (and thus $\gcd(a,n)$) or $b$ (and thus $\gcd(b,n)$).