Let $G$ be a group, $X$ a set, and define $(\cdot)$ an action of $G$ on $X$ as $(\cdot): G\times X \rightarrow X$
Let $L(X)=\{f:X\rightarrow \mathbb{C}\}$
If $g\in G$ and $f\in L(X)$ we define $\circ$ such that $\circ: G\times L(X) \rightarrow L(X)$ is defined as:
$$(g\circ f)(x)=f(g^{-1}\cdot x)$$
My attempt
Note that for $g=e$ we have:
$$(e\circ f)(x)=f(e^{-1}\cdot x)=f(e\cdot x)=f(x)$$
Moreover, let $g_1\, \, g_2 \in G$, then
$$g_1\circ(g_2\circ f)(x)= g_1\circ f(g_2^{-1}\cdot x)=f(g_1^{-1}\cdot (g_2^{-1}\cdot x))=f((g_1^{-1}\cdot g_2^{-1})\cdot x)=f((g_2\cdot g_1)^{-1}\cdot x)=(g_2\circ g_1)\circ (f)(x)$$
But here, I'm stuck, because I'm supposed to get: $$g_1\circ(g_2\circ f)(x)=(g_1\circ g_2)\circ (f)(x)$$
Can someone help me? Thanks.
I shall rephrase the problem slightly and use $\star$ instead of $\circ$, since $\circ$ is liable to cause confusion, especially when writing it is a composition e.g. $g\circ f$.
Proof: You have shown correctly that $e\star\alpha=\alpha$ for all $\alpha\in L(X)$ (where $e$ is the identity of $G$).
Here is how I would do the second part:
$$(g_1\star (g_2\star\alpha))(x)=(g_2\star\alpha)(g_1^{-1}\cdot x)=\alpha(g_2^{-1}\cdot(g_1^{-1}\cdot x))=$$ $$\alpha((g_2^{-1}g_1^{-1})\cdot x)=\alpha((g_1g_2)^{-1}\cdot x)=((g_1g_2)\star\alpha)(x)$$ for all $x\in X$, so $g_1\star(g_2\star\alpha)=(g_1g_2)\star\alpha$ for all $g_1,g_2\in G$ and $\alpha\in L(X)$.
Your mistake appears to be the first equality in the final part:
Note that $g_1\circ (g_2\circ f)(x)$ would be better written as $(g_1\circ (g_2\circ f))(x)$ to avoid confusion, since the whole thing is being applied to $x$. It is important to tread carefully when dealing with equalities of functions; using more intuitive notation will reduce the likelihood of making errors :)