Let $G$ be a group, and let $d=\gcd(a,b)$
Prove: $\forall a,b\in\mathbb{Z}$, $x\in G$:
$$\left\langle x^{a},x^{b}\right\rangle =\left\langle x^{d}\right\rangle. $$
My attempt was to first prove that: $$\left\langle a,b\right\rangle =\left\langle d\right\rangle $$
and then maybe rely on this proof, to show that $$\left\langle x^{a},x^{b}\right\rangle \subseteq\left\langle x^{d}\right\rangle $$
and
$$\left\langle x^{a},x^{b}\right\rangle \supseteq\left\langle x^{d}\right\rangle $$
Is this direction right? I would appreciate any help.
Thanks and sorry if I have English mistakes