Let $f: \{1,2\} \to \{1,2,3\}$ be defined as follows:
$1 \mapsto 2$
$2 \mapsto 1$
Let $g: \{1,2,3\} \to \{1,2,3\}$ be defined as follows:
$1 \mapsto 1$
$2 \mapsto 1$
$3 \mapsto 3$
The composition $g \circ f: \{1,2\} \to \{1,2,3\}$ is the constant map
$1 \mapsto 1$
$2 \mapsto 1$
but neither $f$ nor $g$ is constant.
There is a general statement that can made about how the composition of two functions becomes a constant mapping. The pattern of this example is all that is needed to find this more abstract truth.
The OP is encouraged to find the answer to this more probing question and to let us know how their work is progressing.