Your proof is fine. I like the insight of choosing to use the contrapositive - that's a skill that will serve you well, because it makes the proof swifter and more elegant here, in my personal opinion.
It _might_ be worth spelling out in your proof that this in the contrapositive, and thus implies the result you intended to prove, just for completeness' sake, though. A minor nitpick but nothing huge.