We shall construct a map $$ \varphi : \left\{0,1,2,3\right\} \times \left\{0,1\right\} \longrightarrow S \subseteq \mathbb{Z}_8 $$ which satisfies $$ \varphi (a+b \bmod4,c+d \bmod 2)=\varphi(a,c) +\varphi(b,d) \bmod 8, \quad \forall (a,c),(b,d) \in \mathbb{Z}_2 \times \mathbb{Z}_4 $$ I figured out by intuition that some possible choices for $\varphi$ are $$ \varphi (x,y)=cx, \quad c\in \left\{1,2\right\},\,\forall (x,y)\in \mathbb{Z}_4 \times \mathbb{Z}_2 $$ so that $\mathbb{Z}_2$ is ignored and $\mathbb{Z}_4$ maps to either $\{0,1,2,3\}$ or $\{0,2,4,6\}$.
Is my approach correct? Could you provide me with a more formal way to carry through with this kind of construction process?
The group $\Bbb Z_2\times \Bbb Z_4$ is generated by $(1,0)$ and $(0,1)$, so the choices of $\varphi(0,1)$ and $\varphi(0,1)$ determine the homomorphism completely. To get a well-defined homorphism you must pick those two values such that $2\cdot\varphi(1,0)=0$ in $\Bbb Z_8$ and $4\cdot\varphi(0,1)=0$ in $\Bbb Z_8$.