Consider a group $G\leq S_{n}$ and $X$, a finite set of cardinality $|X| = n $. Let $C = \{c_1,c_2,...,c_m\}$; where we call the elements of $C$ colours. We consider $f \in C^{X}$, that is a function $f : X \to C $.
This being the only information we have, I'm struggling to understand why the following is true:
$$(g\cdot f )(x) = (f\circ g^{−1})(x) = f (g^{-1}(x))$$
It is not something that you can prove. It’s simply a definition.
Your group $G$ acts in a trivial way on $X$ because $X$ has $n$ elements:
$X=\{x_1,\dots , x_n\}$
and $ g\cdot x_i:=x_{g(i)}$
So you have a natural left action of $G$ on $X$.
Now if you consider the set $\Lambda$ of all the possibile way to color the elements of $X$, so the set of all functions $f: X\to C$, you get also a natural action of $G$ on $\Lambda$:
$(f\cdot g)(x):=f(g\cdot x)$
this action is well defined because it is a right action of $G$. In fact if you defined a left action in the following way
$(g\cdot f)(x):=f(g\cdot x)$
then it would be not true
$(hg)\cdot f=h(g\cdot f)$
In any case you want always actions at left side, because are more natural to write. If you want to resolve this little problem, you can simply define the left action of $G$ on $\Lambda$ in the following way
$g\cdot f (x):=f(g^{-1}\cdot x)$