If it is not one-to-one, then there exist two values x1 and x2 such that f(x1) = f(x2) but x1 not= x2 or x1 = x2 and f(x1) not= f(x2)

Continue this until it fails miserably. The onto proof is very similar.

This is an academic question so to facilitate learning, please no one just jump in with a full solution.