I know this is a classical proof by contradiction exercise, and there are full solutions else where, doing a quick search I didn't find any, but I would approach this question like this:
Suppose $\log_a(b) = \dfrac{p}{q}$ where $p,q \in \mathbb{Z}$ and $\gcd(p,q) = 1$. Then this implies $a^{\frac{p}{q}} = b$ which implies $a^p = b^q$. By the fundamental theorem of arithmetic we know $a^p$ has a unique prime factorization and so does $b^q$. That means $a^p, b^q$ must have the same unique prime factorization. If $p,q > 0$ then $a|a^p$ but $a\not |b^q$ contradiction. Similar argument for if one of $p$ or $q$ less than $0$.
Would this be a correct proof for this question, are there other common different proofs?
Thoughts after seeing answers: My confusion for not being able to see the answer right away was because I thought $\frac{p}{q}$ could be negative, hence there is another possibility in the proof. But $\log_a(b) < 0$ implies $b < 1$ which is impossible since $b$ is a prime.
Since $a^p=b^q$, by the Fundamental Theorem of Arithmetic you have a contradiction simply because the left side has $a$ as its only prime factor and the right side has $b$ as its only prime factor.