Solution 1:

This is false. For example, if $f$ is constant, then $f\circ\phi$ will also be constant. If $g$ is nonconstant, you won't be able to make $f\circ\phi = g$.