Classification of finite group upto Isomorphism of order $6$ :
$|G|=6=2\cdot 3$
$H:=\textrm{Syl}_3(G) $ and $K:=\textrm{Syl}_2(G) $
Then $n_3\cong{1}\mod(3) $and $n_3|2$
$$\boxed{n_3=1}$$
$n_2\cong{1}\mod(2) $and $n_2|3$
$$\boxed{n_2=1\text{or}3}$$
We have so far -
$H \vartriangleleft G$
$K \le G$
$H\cap K=(0) $
$|HK|=6=|G|$
Hence $G=H\rtimes_{\phi}K$
Where $\phi: K\to \textrm{Aut}{H}$ is a homomorphism.
Let $H=\langle x\rangle, K=\langle y\rangle$
$\textrm{Aut}(H) =\{\textrm{id}(x\to x) ,\psi(x\to x^2)\}$
Since $\phi: K\to \textrm{Aut}(H) $ is a homomorphism, $\phi(y) =\textrm{Id}$ or $\phi(y) =\psi$
Case $1$ :
$G=\langle x, y |x^3=1=y^2,y^{-1}xy=x\rangle\cong\mathbb{Z}_3\times \mathbb{Z}_2$
Case $2$ :
$G=\langle x, y |x^3=1=y^2,y^{-1}xy=x^2\rangle\cong D_3\cong S_3$
Now I want to compute the semidirect product $\mathbb{Z}_3,\mathbb{Z}_2$ explicitly.
$G=\Bbb{Z_3}\rtimes_{\phi}\Bbb{Z_2}=\{ (h,k):h\in \Bbb{Z_3},k\in \Bbb{Z}_2 \}$
Where $(h_1, k_1)•(h_2, k_2) =(h_1+\phi_{k_1}(h_2), k_1+k_2) $
Let $\psi:\Bbb{Z}_3\to \Bbb{Z}_3$ is an automorphism.
Then $\psi$ respect the generating set i.e $\psi(1) = 1 \text{or} 2$
$\textrm{Aut}(\Bbb{Z_3}) =\{\textrm{Id}(x\to x),\psi(x\to 2x)\}$
Case $1$ : $\phi=\textrm{Id}$
$G=\Bbb{Z_3}\rtimes_{\textrm{Id}}\Bbb{Z_2}=\{ (h,k):h\in \Bbb{Z_3},k\in \Bbb{Z}_2 \}$
Where $\begin{align}(h_1, k_1)•(h_2, k_2)&=(h_1+h_2,k_1+k_2)\end{align}$
$G=\Bbb{Z_3}\rtimes_{\textrm{Id}}\Bbb{Z_2}\cong \Bbb{Z_3}\times\Bbb{Z_2}\cong \Bbb{Z}_6$
Case $2$ : $\phi=\psi$
$G=\Bbb{Z_3}\rtimes_{\psi}\Bbb{Z_2}=\{ (h,k):h\in \Bbb{Z_3},k\in \Bbb{Z}_2 \}$
Where
$\begin{align}(h_1, k_1)•(h_2, k_2)&=(h_1+\psi_{k_1}(h_2), k_1+k_2)\\&= (h_1+2h_2,k_1+k_2)\end{align}$
Computing the order:
$|(0, 0) |=1$
$(1, 0) •(1, 0) =(1+2, 0) =(0, 0) $
$(2, 0) •(2, 0) =(2+4, 0) =(0, 0) $
$(0, 1) •(0, 1) =(0, 2) =(0, 0) $
$(1, 1) •(1, 1) =(1+2, 2) =(0, 0) $
$(2, 1) •(2, 1) =(6, 2) =(0, 0) $
What I have done is completely wrong.
I think I have made a mistake in the group operation.
Please rectify.
You are misunderstanding the semidirect product.
To do the semidirect product of $H$ by $K$, you do not select an automorphism of $H$. You select a homomorphism $\psi\colon K\to \mathrm{Aut}(H)$, and you use $\psi$ to define the multiplication. You define the multiplication by $$(h_1,k_1)\bullet (h_2,k_2) = \Bigl( h_1\bigl(\psi(k_1)(h_2)\bigr), k_1k_2\Bigr),$$ where $\psi(k_1)\in\mathrm{Aut}(H)$, so we can evaluate it at $h_2$ to get an element of $H$.
You are instead selecting an automorphims $\phi\in\mathrm{Aut}(H)$ and trying to define the product as $$(h_1,k_1)\bullet(h_2,k_2) = (h_1\phi(h_2),k_1k_2),$$ which of course does not work. It's not even associative in general: for example, with $H=\mathbb{Z}_3$ and $\phi(x)=x^{-1}$, you would have $$\Bigl( (x,e)(x,e)\Bigr)(x,e) = (xx^{-1},e)(x,e) = (x^{-1},e)$$ but $$(x,e)\Bigl( (x,e)(x,e)\Bigr) = (x,e)(xx^{-1},e) = (x,e).$$
So what you need is a morphism from $\mathbb{Z}_2$ to $\mathrm{Aut}(\mathbb{Z}_3)$. You can select the one that sends every element of $\mathbb{Z}_2$ to the identity automorphism; that's your first construction. Or you can select the one that sends the identity element of $\mathbb{Z}_2$ to, necessarily, the identity automorphism; and sends the nonidentity element of $\mathbb{Z}_2$ to the map sending $h$ to $2h$. Then the correct formula for the multiplication is $$(h_1,k_1)\bullet (h_2,k_2) = \left\{\begin{array}{ll} (h_1+h_2,k_1+k_2)&\text{if }k_1=0,\\ (h_1+2h_2,k_1+k_2)&\text{if }k_1=1. \end{array}\right.$$