Assuming $(a,b)=1$, I want to construct an isomorphism $\phi:\Bbb Z_a\times\Bbb Z_b\mapsto\Bbb Z_{a\cdot b}$ defined by $\phi(1,1)=1$. So I need to prove that for any $(x,y)\in \Bbb Z_a\times\Bbb Z_b$ there exists $n\in \Bbb N$ such that $n\equiv x \mod a$ and $n\equiv y\mod b$
For example $(1,2)\in\Bbb Z_2\times\Bbb Z_3$ is $(5\mod2,5\mod3)$
I'm not sure how to prove that, I tried using the Bezout equality...
For the other way we need to assume $\Bbb Z_a\times\Bbb Z_b$ is cyclic i.e. $\Bbb Z_a\times\Bbb Z_b =\langle(x,y)\rangle$ for some $(x,y)$
Since $0\in\langle(x,y)\rangle$, $\exists n\in \Bbb N~:~nx\equiv0\mod a~\text{and } ny\equiv 0\mod b$
And here I'm stuck again.
First note that the order of an element $(x,y) \in \mathbb{Z}_a \times \mathbb{Z}_b$ is $\text{lcm}(r_1,r_2)$, where $r_1$ is the order of $x \in \mathbb{Z}_a$ and $r_2$ is the order of $y \in \mathbb{Z}_b$. Also note that $\text{lcm}(a,b) = ab$ iff $a$ and $b$ are relatively prime.
For the forward direction, we can just prove the contrapositive. So suppose $\mathbb{Z}_a \times \mathbb{Z}_b$ is not cyclic. Then there exists some $r \lt ab$ such that $r(1,1) = (0,0)$ otherwise $\mathbb{Z}_a \times \mathbb{Z}_b$ would be cyclic. But this means that $\text{lcm}(1,1) \le r \lt ab$ so that $a$ and $b$ are not relatively prime.
For the other direction, suppose that $\mathbb{Z}_a \times \mathbb{Z}_b$ is cyclic. Now $(1,1) \in \mathbb{Z}_a \times \mathbb{Z}_b$ has order $\text{lcm}(r_1, r_2)$ where $r_1$ is the order of $1 \in \mathbb{Z}_a$ and $r_2$ is the order of $1 \in \mathbb{Z}_b$. Then $\text{lcm}(r_1, r_2) = ab$ iff $a$ and $b$ are relatively prime. So if $\mathbb{Z}_a \times \mathbb{Z}_b$ is cyclic, the order of $(1,1)$ is $ab$ since $(1,1)$ has to generate the group and hence $a$ and $b$ must be relatively prime by the previous statement.