To check that $f \to f \circ g$ is continuous in $f$ as a map $X^X \to X^X$ for a fixed $g \in X^X$:  take a net $f_i \to f$ ($i \in I$, some directed set) in $X^X$ converging to $f \in X^X$. This means exactly that  $$\forall x \in X: f_i(x) \to f(x)\tag{1}$$ in $X$. So in particular for any $x \in X$, $(f_i \circ g)(x) = f_i(g(x)) \to f(g(x)) = (f \circ g)(x)$, applying $(1)$ to $g(x)$  as the evaluation point. This means exactly that $(f_i \circ g) \to (f \circ g)$ in $X^X$ by the characterisation of the product topology by pointwise convergence (of nets). So indeed $f \to f \circ g$ is continuous on $X^X$.