1. Let f be an application from E to E (E≠∅) such that f∘f∘f = f
Prove f is an injection ⇔ f is a surjection

I honestly have no idea how to start and I'd love to know the answer before my math exam tomorrow morning

2. Suppose $f$ is an injection. Show that for all $e\in E$, $f(f(e))= e$. This will prove $f$ is a surjection.

Now suppose $f$ is a surjection and $f(x) = f(y)$. Let $z,w\in E$ such that $f(z) = x$ and $f(w) = y$. Then $$x = f(z) = f(f(f(z))) = f(f(x)) = f(f(y)) = f(f(f(w))) = f(w) = y$$

Hence, $f$ is an injection.