If $\gcd(a,b)=9,$ then what is $\gcd(a^2,b^3)\,?$ I know that by the euclidean algorithm, I can obtain the following equations.
I tried some algebraic manipulation but I can't seem to determine, if $$\text{if }\;\gcd(a,b)=9,\text{ then what is }\gcd(a^2,b^3)\;?$$

Note $\ (A,B) = 9\,\Rightarrow A,B = 9a,9b,\ \color{}{(a,b) = 1},\, $ so $\,\color{#c00}{(a^2,b^3) = 1}\,$ by Euler
Thus  $\ (A^2,B^3) = ((9a)^2,(9b)^3) = 81(\color{#c00}{a^2},9\color{#c00}{b^3}) = 81(a^2,9) = 81(a,3)^2 = (A,27)^2$
