The contrapositive of a statement of the form "A implies B" is the logically equivalent statement "not-B implies not-A."
Do not confuse the contrapositive with the converse, which is very different and not necessarily true.
For example, let A be the statement "R is a square" and B be the statement "R is a rectangle". Then A implies B. The contrapositive of this is the statement "if R is not a rectangle, then R is not a square", which is logically equivalent to the first statement. On the other hand, the converse is "if R is a rectangle, then R is a square", an implication which isn't even true!