Q:

Taking the compositions of two constant functions

The questions asks to prove that the composition of g with f is not equal to f with g. However, I don't know whether you can even take the composition of constant functions or how. 
so if f(x)=2 and g(x)=4. 
How do you take the composition? 

A:

Suppose $f,g : \mathbb{N} \rightarrow \mathbb{N}$. Then $(f \circ g)(x) =f(g(x))$ and $(g \circ f)(x) = g(f(x))$. 
Hence if $f(x) = 2$ and $g(x) = 4$, then $f(g(x)) = f(4) =2$ and $g(f(x)) = g(2) = 4$.
Hence $f \circ g$ is the constant function taking value $2$ and $g \circ f$ is the constant function taking value $4$. They are not equal. 