False homework proof?: The image of an element has the same order.
Solution 1:
That's correct, and that's a correct counterexample. The two things you can prove are what you said (it's true if $\phi$ is a isomorphism), or with the given condition, the order of $\phi(g)$ must divide $k$.
Solution 2:
Injectivity is a necessary and sufficient condition for the question statement to hold, which we can see as follows. If $\phi$ is injective then the order of $g$ equals the order of $\phi(g)$ because $g^n = e_G \Leftrightarrow \phi(g)^n = e_{G'}$ so the least $n > 0$ for which $g^n = e_G$ is the least $n$ for which $\phi(g)^n = e_{G'}$. Also, if $\phi$ is not injective then there is an element $g \ne e_G$ with $\phi(g) = e_{G'}$ and then clearly the order of $g$ and the order of $\phi(g)$ differ.
Solution 3:
Yes, you are right. All you can say in general is that the order of $\phi(g)$ divides $k$.
Solution 4:
The other answers correctly discuss that the order of $\phi(g)$ must divide the order of $g$, but neglect to mention that some people use the rarer convention that $g$ is of order $k$ simply if $g^k = 1$, even if $k$ isn't the minimal such exponent. Rare as this convention is, the statement you were given to prove is true under it, so it's probably what was meant. Check carefully what convention your book/class uses.