If $\gcd (a,b)=p\qquad p\text{ is a prime.}$
What are the possible values of $\gcd(a^2,b)$
I saw this solution:
$a:=\alpha p,\qquad b:=\beta p,\qquad \gcd(\alpha,\beta)=1$
$(a^2,p)=(\alpha^2 p^2,\beta p)=p(\alpha ^2 p,\beta)$
$\color{red}{=p(p,\beta)}\in \{p,p^2\}$
I don't understand the red, how did they got this?