We show the "if" direction. Suppose $|G|$ is a cyclic group of odd order and that there exist $x$ and $y$ in $G$, with $x \not = y$ that satisfy $x^2=y^2$. Then $x^{-1}y$ is not $e$ because every distinct element in a group $G$ has a unique inverse. However, assuming $x^2=y^2$, then $x^{-2}=y^{-2}$, and so the following hold:
$$(x^{-1}y)^2 = x^{-2}y^2 = y^{-2}y^2 = e.$$
So this gives $(x^{-1}y)^2=e$. As $x^{-1}y$ is not $e$, this implies $\langle x^{-1}y \rangle$ a subgroup of $G$ of order exactly $2$. By the fact that $|G|$ is odd, this is impossible by Lagrange's Thm.
So see the only if direction, suppose $|G| =\langle y \rangle$ has order $2k$. Then as $y$ generates $G$, it follows that $y^k$ is not $e$, lest $G$ has $k$ or fewer elements. But what about $(y^k)^2$ though.
Meanwhile, $G$ can be any group and that $\phi$ is an injection still holds.
Suppose that $G$ has odd order and $y^2=x^2$. We first show that $y$ and $x$ commute. Then letting $\alpha$ be the element such that $x \in \langle \alpha \rangle$, note that $x^2$ and thus $y^2$ is in $\langle \alpha \rangle$. Let $q$ be the order of $\langle \alpha \rangle$, then $q$ is odd, and $y^{2 \left \lceil \frac{q}{2} \right\rceil} = y^{q+1} = y^qy = y$. So , as $y^2$ is in $\langle \alpha \rangle$ and $(y^2)k = y$ for some positive integer $k$, it follows that $y$ is in $\langle \alpha \rangle$ too. Since $x$ and $y$ are in the same cyclic group namely $\langle \alpha \rangle$ they must commute. So here as well $x^{-1}y$ is not $e$ and $(x^{-1}y)^2= x^{-2}y^2$. Finish as above.
Meanwhile, if $G$ has even order, then whether $G$ is abelian or not, there is an element $y \in G$ such that $y \not = e$ yet $y^2=e$. If G is a group of even order, prove it has an element $a \neq e$ satisfying $a^2 = e$. . Again, finish as above.