I know this question has been done before (Surjectivity implies injectivity), but I'm not pleased with the answer, because, it defines a "function" $g$, such that if $f(z) = x$, then $g(x) = z$. But $g$ is a function, only if $f$ is injective, and that's what we are trying to prove, so you can't use that. In fact, if $f(x) = f(y) = r$ and $x \not = y$, then $g(r) = x$ y $g(r) = y$ and $g$ is not a function.
Now, I have proved that if $f$ is injective, then it is surjective.
Let X be a set of order $n$ and $f:X \rightarrow X$, a injective function. First I supposed $f$ is not injective, therefore, there exist a $z\in X$, such that $z\not = f(x) \ \forall x\in X$, in particular $z\not = f(z)$. Then, I defined the set $B= \{f(z), f^2(z), f^3(z), ... f^n(z)\}$ and showed it was, in fact, equal to X. But, we can notice that $z\not = f^i(z) \ \forall i \leq n$ then $z\not \in B = X$, and we have arrived to a contradiction, since we parted by saying that $z\in X$, therefore $f$ is surjective.
Now, how would one proceed to show the counterpart?