Let $f$ be an automorphism of the finite group $G$ such that $f\circ f=id$ and $f(x)=x\implies x=e$
Prove that $f(x)=x^{-1}~\forall x\in G$
If we can prove that $f(x)$ and $x$ commute for any given $x\in G$ then we're done with the proof because it would imply
$$xf(x)=f(x)x$$
$$f(f(x))f(x)=f(x)x$$
Because $f\circ f=id$. And since $f$ is a homomorphism: $$f(f(x)x)=f(x)x\implies f(x)x=e\implies f(x)=x^{-1}$$
I don't know how to proceed
The fact that $G$ is abelian can be deduced once we have $f(x)=x^{-1}$ because that function is a homomorphism if and only if $G$ is abelian
Proof : Define $\alpha:G \to G$ by $\alpha(x)=x^{-1}f(x)$. Use the hypothesis to prove $\alpha$ is one one. That is, $$\alpha(x)=\alpha(y) \Longrightarrow x^{-1}f(x)=y^{-1}f(y)$$ $$\hspace{2cm}\Longrightarrow yx^{-1}=f(yx^{-1})$$
$$\hspace{2.2cm}\Longrightarrow yx^{-1}=e\;\;\text{by hyp}$$
$$\Longrightarrow y=x$$
Finiteness implies $\alpha$ is onto as well. Onto means, for every $g \in G$, there exist $x \in G$ such that $\alpha(x)=x^{-1}f(x)=g$ $\;\blacksquare$
Proof of your result: $$f(g)=f\Big(x^{-1}f(x)\Big)=f(x^{-1})f^2(x)=f(x^{-1})x=\Big[x^{-1}f(x)\Big]^{-1}=g^{-1}$$