We wish to show that $\gcd(a,b) = d \implies \gcd(a^{3},b^{3}) = d^{3}$. Would just like to make sure my proof is correct.
Let $a = p_1^{k_1}p_2^{k_2}p_3^{k_3}...p_n^{k_n}$
Let $b = q_1^{k_1}q_2^{k_2}q_3^{k_3}...q_n^{k_n}$
Define $d = \gcd(a,b) = r_1^{k_1}r_2^{k_2}r_3^{k_3}...r_n^{k_n}$, where $r_i = \{p,q | p_i = q_j\}$
$a^3 = p_1^{k_1}...p_n^{k_n}p_1^{k_1}...p_n^{k_n}p_1^{k_1}...p_n^{k_n}$
$b^3 = q_1^{k_1}...q_n^{k_n}q_1^{k_1}...q_n^{k_n}q_1^{k_1}...q_n^{k_n}$
Thus, $\gcd(a,b) = d^3$ because each factor $p_i$ and $q_j$ now appears three times when we cube $a$ and $b$. Is this sufficient?
Hint: First you are assuming that the exponents in each of the prime decompositions are the same, this is not the case. Second, the definition of $r$ is very imprecise because it depends on $q_j$ and so you should, at least, pick an order for the primes. To avoid both of this problems, define $a = p_1^{k_1}\cdots p_n^{k_n}$ and $b=p_1^{\ell _1}\cdots p_n^{\ell _n}$ where $p_1=2,p_2=3$ and $p_n$ is the biggest prime that divides either $a$ or $b.$ Now, define the gcd to be $$gcd(a,b)=p_1^{m_1}\cdots p_n^{m_n},$$ where $m_i = \min \{k_i,\ell _i\}.$ Can you finish the argument with this standard notation?