I'm trying to understand the concept of the semidirect product of two groups.
An application is this answer to a question, where for $p>q$ primes, $q \mid p-1$, there is a non-abelian group of order $pq$ isomorphic to
$$C_p\rtimes_{\phi} C_q$$
for some homomorphism $\phi: C_q\to\mathrm{Aut}(C_p)\cong C_{p-1}.$
I'm trying to understand what this homomorphism looks like.
The answer states the following at point 2:
(Note the author defines $P=\langle x\mid x^p=1\rangle$ and $Q=\langle y\mid y^q=1\rangle$.)
Now, since $Q=\langle y\rangle$ normalizes $P=\langle x\rangle$, the map $\phi_k:P\to P$ given by $\phi_k(x)=y^kxy^{-k}$ is well defined. Moreover, it is clearly an automorphism with inverse $\phi_{-k}$. Finally, since $\phi_{k}\phi_j=\phi_{k+j}$, the map $y^k\mapsto\phi_k$ defines a homomorphism $\phi:Q\to \mathrm{Aut}(P)$.
Here's where I'm a bit confused - something I'm doing from here on must be wrong, but I'm not sure what. Let's represent $C_p$ and $C_q$ as addition modulo $p$ and $q$, thus the $pq$ elements of $C_p\rtimes_{\phi} C_q$ will be the tuples of the form $(a, b)$ for $a =0, ..., p-1$, $b=0, ..., q-1$.
In the equation $$\phi_k(x)=y^kxy^{-k}$$
$y \in C_q$ so it'll be of the form $(0, m)$ in the semidirect product, $x \in C_p$ will be of the form $(n, 0)$. Thus $y^kxy^{-k}=(0, mk) \circ (n, 0) \circ(0,-mk)$ where $\circ$ is the group operation of the semidirect product.
First, I thought this was just like addition on the tuples, and so I will always get $(n, 0)=x$. This interpretation must be wrong, since then $\phi_k$ would be the trivial homomorphism, and we just get the abelian direct product.
But $\circ$ is defined as $(n_1, h_1) \circ (n_2, h_2) = (n_1 \phi_{h_1}(n_2), h_1 h_2)$, which uses what will be $\phi_k$ in its own definition... so what's going wrong? I don't get how I can actually calculate binary operations on the group.