What you've written doesn't really make sense. However I will try to help.

I suppose you are saying a,b Z. Then if a*b = 1, a and b would both have to be 1 or -1 since no other intergers multiplied together = 1.

If a is 1 or -1 then gcd(a,n) is obviously 1.

converse: Assume gcd(a,n) not = 1, then a cannot be 1 or -1.

Therefore b cannot be an integer such that a * b = 1. Proof by contrapositive.

If this is not what you are saying, please restate.