Your proof comes down to using the same letter $f$ for two different things. You are, first of all, given an $f: A \longrightarrow A$. You furthermore write that there exists a bijection $A \longrightarrow A$. You shouldn't call this map $f$, as there's no reason to believe that it's the same as the map you're originally. Indeed, your argument would imply that all maps $A \longrightarrow A$ are bijections, which is nonsense if $|A| \geq 2$.
Back to the proof itself, we do indeed have to show that $f$ is injective and surjective. We certainly have $im(f \circ f) = A$. Furthermore, $im(f \circ f) = f[f[A]]$. Hence, $im(f) \supseteq f[f[A]] = A$, so $f$ is onto. For injectivity, suppose $f(x) = f(y)$. By surjectivity, let $f(a) = x$, $f(b) = y$. Then $f(f(a)) = f(x) = f(y) = f(f(b))$, so $a = b$. Thus, $x = f(a) = f(b) = y$.