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$!
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$.