I am trying to answer the following question:
Let $G$ and $H$ be two cyclic groups generated by $x$ and $y$ respectively. Determine the condition on the orders $m$ and $n$ of $x$ and $y$ so that the map $f(x^i)= y^i$ is a homomorphism.
How I attempted to solve the question in the following way: Let $r$ and $s$ be two arbitrary integers. Then $$f(x^rx^s) = f(x^{r+s})=y^{r+s}=y^ry^s=f(x^r)f(x^s)$$ Since we made no assumptions about the orders of $x$ and $y$, $f$ is an homomorphism from $G$ to $H$ no matter what the orders of $x$ and $y$ are.
I don't feel confident with my proof and I would love for someone to check it. Finally, I am aware there are some theorems about the order elements of a groups but I am supposed to solve the problem without them.