a is 3m
b is 3n
m and n are relatively prime - they do not have any common
factors.
a2 = 9m2
Since m had no factors in common with n, m2 also has no factors
in common with n. We know that 3 is a common factor of a and b. The
only new possible factor between a2 and b is the second 3 when a is
squared. We do not know whether b had more than one factor of 3.
So, the greatest common factor of a2 and b, when the greatest
common factor of a and b is 3, is either 3 or 9.