I think you’re trying to avoid the whole p1^a1 prime factorization argument, but I still think using the factors of a and b is the way to go.
Suppose gcd(a^2,b) > 1. Then b shares a prime factor with a^2. But a^2 shares all its prime factors with a, so b and a share a prime factor, contradicting the assumption that gcd(a,b) = 1.