Suppose that $G$ is a finite group with $\gcd(|G|,3)=1$. Show that $G=\{x^3:x\in G\}$ Suppose that $G$ is a finite group with $\gcd(|G|,3)=1$. If $\theta:G\longrightarrow G$, $x\longmapsto x^3$ is a homomorphism of groups, we want to prove that $$G=\{x^3:x\in G\}.$$
To this end, we claim that $\ker \theta =1$. Indeed, if $a\in \ker \theta$, then $g^3=1_G$. So $|g| \mid 3$. On the other hand, $|g|\mid |G|$. So, $|g|\mid \gcd(|G|,3)$ and therefore $g=1_G$.
Hence $\theta$ is injective which maps the finite group $G$ into itself. Therefore, $\theta$ is surjective (and hence $\theta\in \mathrm{Aut}(G)$). Then,
$$G=\mathrm{im}\theta=\{x^3:x\in G\}$$
and the result follows.

My question is whether we could work as follows: Take an $g\in G$. Then, using Bezout's identity,
$$g=g^1=g^{|G|a+3b}=(g^b)^3\in \mathrm{im}(\theta)$$
where $a,b$ are integers and $g^b\in G$. So, could we omit using that way the whole premise about the homomorphism $\theta$?

Thanks.
Update: Many apologies, I forgot to define $\theta$!
 A: The first proof uses the fact that $\theta$ is a homomorphism, as it proves that $\ker\theta=1$. This means that $\theta$ is injective, and so bijective as the groups are finite.
Your proof is correct, and does not use the fact that $\theta$ is a homomorphism. It is therefore a better proof. Which is nice.

Both proofs use the fact that the groups are finite, as you prove surjectivity (rather than injectivity) of $\theta$, and then use the fact that $G$ is finite to get that it is a bijection.
Question. Can we push this proof to work for infinite groups?
Yes, we can! A group $G$ is called torsion if every element has finite order. For $h\in G$, I will write $\langle h\rangle:=\{h^i\mid i\in\mathbb{Z}\}$ for subgroup generated by $h$.
Lemma. If $G$ is a torsion group with no element of order divisible by $3$, then the map $\theta: x\mapsto x^3$ is a bijection.
Proof.
Lets use your proof as a starting point, but with a necessary, minor tweak:
Take any $g\in G$. Then, using Bezout's identity,
$$g=g^1=g^{o(g)a+3b}=(g^b)^3\in \operatorname{im}(\theta)$$
where $o(g)$ denotes the order of $g\in G$, $a,b$ are integers and $g^b\in G$.
Hence, $\theta$ is surjective.
To see that $\theta$ is injective, suppose that $\theta(g)=\theta(h)$, that is $g^3=h^3$, and we'll prove that $g=h$. As $g=(g^b)^3$ we have:
$$g=(g^b)^3=(g^3)^b=(h^3)^b.$$
This means that $g\in \langle h\rangle$. Now, the restriction of $\theta$ to $\langle h\rangle$ has image contained in $\langle h\rangle$, and as $\langle h\rangle$ is finite this is the setting of the original question. Hence, the restricted map $\theta|_{\langle h\rangle}: \langle h\rangle\rightarrow \langle h\rangle$ is a bijection. As $g, h\in\langle h \rangle$, it follows that $g=h$ as required.
A: The map $\theta_i:x\mapsto x^i$ for $i>1$ is not in general a homomorphism for finite groups $G$. It is a homomorphism whenever a group $G$ is abelian, though, as is easy to see.
Thus we cannot use the fact that $\theta$ is a homomorphism, since it isn't!
It is a homomorphism on the subgroup $X=\langle x\rangle$ though. And if $|X|$ is prime to $i$, then $\theta_i$ must be injective, since no element of $X$ can be mapped to $1$ (other than $1$) as $|X|$ can contain no elements of order $i$ by Langrage's theorem. Injective maps from a finite set to itself are bijective, and so there are (unique) $i$th roots of any given element.
Since every element has an $i$th root if $\gcd(|G|,i)=1$, the map (not homomorphism) $\theta_i:G\to G$ is bijective.
A: Yes, you can omit those details.

Here's another proof (without even using $\theta$) . . .
To show $H\le G$, since $G$ is finite and $e\in H:=\{ x^3\mid x\in G\}$, it suffices to show that $H$ is closed under $G$'s operation.
Let $h,k\in H$. Then $h,k\in G$ so, by Bézout's Theorem and $\gcd(|G|,3)=1$, we have some $a,b\in \Bbb Z$ such that $|G|a+3b=1$; now
$$\begin{align}
hk&=(hk)^1\\
&=(hk)^{|G|a+3b}\\
&=((hk)^b)^3\\
&\in H \quad \text{(since }(hk)^b\in G\text{)},
\end{align}$$
which is what we wanted to show.

In fact, $H\subseteq G$ by definition.

But, as you have observed, for any $g\in G$, we have some $c\in\Bbb Z$ such that $g=(g^c)^3\in H$. Hence $G\subseteq H$.

Hence $G\cong H$; indeed, we can say $G=H$.
