Suppose $n, m$ are coprime. I need to show that any automorphism $\varphi : \mathbb{Z}_n \times \mathbb{Z}_m$ is of the form $\varphi(x, y) = (ax, by)$ for some $a, b$ with $(a,n)=(b,m)=1$.
I'm having trouble conceptualizing this statement and figuring out where to go. If I say "let $\varphi$ be any automorphism of $\mathbb{Z}_n \times \mathbb{Z}_m$", what do I know about $\varphi$ that can tell me it is of that form? Would I need to identify explicitly what $a$ and $b$ are?
Let me explain why you would think that automorphisms look like this.
First, let us understand automorphisms of $\mathbb{Z}_n$. The point is that because $\mathbb{Z}_n$ is cyclic, a group homomorphism $f : \mathbb{Z}_n \to \mathbb{Z}_n$ is determined by $f(1)$. This is because $f(2) = f(1) + f(1) = 2f(1)$ and $f(3) = f(1) + f(1) + f(1) = 3f(1)$ and so on. So all group homomorphisms $f : \mathbb{Z}_n \to \mathbb{Z}_n$ are of the form $f(x) = ax$ for some $a \in \mathbb{Z}_n$.
So what can $a = f(1)$ be? For instance if $a = 0$ then $f$ is identically $0$. This is a group homomorphism but it isn't an isomorphism. For it to be an isomorphism, we need $f$ to be invertible. This means that $a$ needs to be invertible. And to prove this, if $f$ is invertible, then we need $f(b) = 1$ for some $b$. Using our formula for $f$, that says that $ab = 1$. So $b = a^{-1}$.
So in summary, elements $\operatorname{Aut}(\mathbb{Z}_n)$ correspond to units of $\mathbb{Z}_n$. Namely all automorphisms look like $f(x) = ax$ where $(a,n) = 1$.
Ok so that's the first step. The second step is to understand what happens when we have a product of cyclic groups: $\mathbb{Z}_n \times \mathbb{Z}_m$. Now we need to put on our linear algebra hats and think of $\mathbb{Z}_n \times \mathbb{Z}_m$ as having a "basis" $(1,0)$ and $(0,1)$. And every homomorphism $f : \mathbb{Z}_n \times \mathbb{Z}_m \to \mathbb{Z}_n \times \mathbb{Z}_m$ is given by picking values for $f(1,0)$ and $f(0,1)$. Let's say
\begin{align} f(1,0) = (a,b), \\ f(0,1) = (c,d). \end{align}
For example, now $f(3,2) = f((1,0) + (1,0) + (1,0) + (0,1) + (0,1)) = 3(a,b) + 2(c,d)$.
So thinking about linear algebra, we see that every group homomorphism, is given by
$$ f(x,y) = x(a,b) + y(c,d) = (ax + cy, bx + dy). $$
So the \$1 m question is: why must $b$ and $c$ be $0$? It comes down to the fact that $f(n,0) = f(0,0) = (0,0)$ and $f(0,m) = (0,0)$. Notice that with our formula,
$$ f(n,0) = n(a,b). $$
Of course $an \equiv 0 \pmod n$, that isn't a problem. But we also need $bn \equiv 0 \pmod m$. Recall now that the hypothesis is that $(n,m) = 1$. So $n$ is a unit mod $m$ so $bn \equiv 0 \pmod m$ means that $b \equiv 0 \pmod m$ (multiply by $n^{-1}$). Likewise $c \equiv 0 \pmod n$.
So putting everything together, we have shown now that $$f(x,y) = (ax, dy)$$ because $b, c = 0$ (mod $m, n$ respectively). And now we go back to the beginning where we just had one cyclic group rather than a product of them to see that $a, d$ must be units.