The contrapositive of p→q is ~q → ~p.
So we want to prove that if n is not odd, then n^3 is not odd, i.e. if n is even, then n^3 is even.
If n is even, then it can be written as n = 2p, where p is some integer. n^3 = (2p)^3 = 2(4p^3), which is even. So if n is even, then n^3 is even.