Show that the group $G$ is of order $12$ I am studying some exercises about semi-direct product and facing this solved one:

Show that the order of group $G=\langle a,b| a^6=1,a^3=b^2,aba=b\rangle$ is $12$.

Our aim is to show that $|G|\leq 12$ and then $G=\mathbb Z_3 \rtimes\mathbb Z_4=\langle x\rangle\rtimes\langle y\rangle$. So we need a homomorphism from $\mathbb Z_4$ to $\mathrm{Aut}(\mathbb Z_3)\cong\mathbb Z_2=\langle t\rangle$ to construct the semi-direct product as we wish: $$\phi:=\begin{cases} 1\longrightarrow \mathrm{id},& \\\\y^2\longrightarrow \mathrm{id},& \\\\y\longrightarrow t,& \\\\y^3\longrightarrow t, \end{cases}
$$ Here, I do know how to construct $\mathbb Z_3 \rtimes_{\phi}\mathbb Z_4$ by using $\phi$ and according to the definition. My question starts from this point:
The solution suddenly goes another way instead of doing $(a,b)(a',b')=(a\phi_b(a'),bb')$. It takes $$\alpha=(x,y^2), \beta=(1,y)$$ and note that these elements satisfy the relations in group $G$. All is right and understandable but how could I find such these later element $\alpha, \beta$?? Is really the formal way for this kind problems finding some generators like $\alpha, \beta$? Thanks for your help.

$aba=b$ implies that $bab^{-1}=a^{-1}$, hence $bab^{-1}a^{-1}=a^{-2}$; it follows that $G'\supseteq \langle a^{-2}\rangle\cong \mathbb{Z}_3$. Also,
$b^{-1}a^2b=(b^{-1}ab)^2 = (b^{-1}aba.a^{-1})^2=(b^{-1}.ba^{-1})^2=a^{-2}\in \langle a^2\rangle$. 
Hence $\langle a^2\rangle$ is normalised by both $b$, and $a$; $\langle a^2\rangle\triangleleft G$. Then $G/\langle a^2\rangle=\langle \bar{a},\bar{b}\colon \bar{a}^2=1, \bar{b}^2=\bar{a}, \bar{b}\bar{a}\bar{b}^{-1}\bar{a}^{-1}=1\rangle  = \langle \bar{b}\colon \bar{b}^4=1\rangle \cong \mathbb{Z}_4$.
Hence $G'=\langle a^2\rangle\cong \mathbb{Z}_3$, and $G/G'\cong \mathbb{Z}_4$. 
Further $aba=b$ implies $abab=b^2$, i.e. $(ab)^2=b^2=a^3$. Therefore, $(ab)^4=(a^3)^2=1$, and $(ab)^2\neq 1$; hence $\langle ab\rangle$ is cyclic subgroup of $G$ of order $4$, and clearly, it should intersect trivially with $G'$ (compare orders). Hence $G=G'\rtimes \langle ab\rangle \cong \mathbb{Z}_3\rtimes \mathbb{Z}_4$.
...........................................................
To construct semidirect product of $\mathbb{Z}_3=\langle x\rangle$ by $\mathbb{Z}_4=\langle y\rangle$, note that $y$ acts on $\langle x\rangle$ by conjugation, and hence $y^{-1}xy\in \{x,x^2\}$. If $y^{-1}xy=x$, then $G$ will be abelian, and if $y^{-1}xy=x^2$, then $G$ will be the non-abelian group of order 12 (it is different from $D_{12}$, and $A_4$; why?).
