Does $f_1g≃f_2g$ imply $f_1≃f_2$? Let $f_1,f_2,g$ be continuous map between topological spaces. If we have homotopy $f_1g≃f_2g$, then in what condition of $g$ we have $f_1≃f_2$? For given two continues map $g,h$ be homotopy, I mean there exist continues $f_t$ such that $f_0=g$ and $f_1=h$.
I'm not going to pursue big generality for this question, some sufficient conditions will be fun, just like the one Noel Lundström pointed out in the comment, when $g$ is split, then this can be true.
 A: Here is a partial answer. Since your question is in general quite difficult, I'll hope you find some use for my thoughts. I'll be sketchy with details since this is already long enough, but will be happy to give references for further reading. I'll work in the pointed category. All spaces will be based, all maps and homotopies basepoint-preserving, and all cones and suspensions reduced.
Let $g:X\rightarrow Y$ be a map. First let us study what properties are imposed on $g$ by the assumption:

$(\ast)$ for any pair of maps $\varphi_1,\varphi_2:Y\rightarrow Z$ satisfying $\varphi_1g\simeq\varphi_2g$ it holds that $\varphi_1\simeq\varphi_2$.

We define the mapping cone of $g$ to be the space $C_g$ obtained as the pushout of the span
$$Y\xleftarrow{g}X\xrightarrow{in_0}CX,$$
where $CX=X\wedge I$ is the cone on $X$ ($I$ is given the basepoint at $1$). Let $\delta:Y\rightarrow C_g$ be the inclusion map. Then the composition $\delta g:X\rightarrow C_g$ is canonically null-homotopic, and $(\ast)$ applies to $\delta g\simeq\ast \simeq\ast g$ to give a null-homotopy $\delta\simeq\ast$. In general the mapping cone of $\delta$ is homotopy equivalent to $\Sigma X$. On the other hand, any choice of homotopy $\delta\simeq\ast$ induces a homotopy equivalence $C_\delta\simeq C_\ast\simeq C_g\vee\Sigma Y$. Putting these observations together we get a homotopy equivalence
$$\Sigma X\simeq C_g\vee\Sigma Y.$$
This is a necessary condition for any map satisfying $(\ast)$. Noel Lundström observed in the comments that $g:X\rightarrow Y$ satisfies $(\ast)$ whenever $Y$ is a homotopy retract of $X$. Here we see that even if this stricter condition is not met, $\Sigma Y$ will always be a homotopy retract of $\Sigma X$ whenever $g$ satisfies $(\ast)$.
Now let us drop the assumption $(\ast)$. There isn't much more we can do with the basic ideas outlined above without introducing some more further conditions. Here is a fairly reasonable assumption:

$(\ast\ast)$ $g$ appears in a homotopy cofibration sequence of the form
$$Y'\xrightarrow{w} A\rightarrow X\xrightarrow{g}Y\xrightarrow{\delta} \Sigma A\rightarrow\Sigma X\rightarrow \dots$$

This assumption is still quite strict. For instance it implies that $Y\simeq\Sigma Y'$, so in particular $Y$ is a suspension and has a comultiplication $\nu:Y\rightarrow Y\vee Y$.
Now our assumptions could be weakened a little. I've written them as they are becaues I can't think of any really interesting examples of the more general case that I have in mind. What we need from the assumptions I have given is that the diagram
$\require{AMScd}$
\begin{CD}
Y@>\delta>>\Sigma A\\
  @V\nu VV@VVcV \\
Y\vee Y@>\delta\vee\delta>>\Sigma A\vee \Sigma A
\end{CD}
commutes up to homotopy. This relates the comultiplication on $Y$ with the suspension comultiplication $c$ on $\Sigma A$. That this is implied by the assumptions is clear because they give $\delta\simeq\Sigma w$. Really it is this diagram that we need, and could leave out the existence of $Y'$, assuming instead that the cofibration sequence begins at $A$, and that $Y$ is a co-H-space with comultiplication $\nu$ making the last diagram homotopy commute.
Now, the point is that for any space $Z$ we have a Puppe sequence
$$\dots\leftarrow[A,Z]\leftarrow[X,Z]\xleftarrow{g^*}[Y,Z]\xleftarrow{\delta}[\Sigma A,Z]\leftarrow[\Sigma X,Z]\leftarrow\dots$$
and the assumptions imply that it is exact at $[Y,Z]$ in a fairly strong sense: if $\varphi_1,\varphi_2\in[Y,Z]$ and $g^*\varphi_1=g^*\varphi_2$, then there is $\alpha\in[\Sigma A,Z]$ such that
$$\varphi_1\simeq\varphi_2+\alpha\delta.$$
Suppose that $\delta\simeq\ast$. Then $\alpha\delta\simeq\ast$ and the last equation implies that $\varphi_1\simeq\varphi_2$. In particular $(\ast)$ is satisfied. On the other hand we have seen above that if $g$ satisfies $(\ast)$, then $\delta\simeq\ast$. Thus:

Proposition: Assume $(\ast\ast)$. Then $(\ast)$ holds for $g$ if and only if $\delta\simeq\ast$.

Recall how the necessity here was established and rerun the details after assuming $(\ast\ast)$. This gives us another eqivalent fomulation.

Proposition: Assume $(\ast\ast)$. Then $(\ast)$ holds for $g$ if and only if $\varphi g\simeq\ast$ implies $\varphi\simeq\ast$ for any map $\varphi:Y\rightarrow Z$.

Furthermore, under $(\ast\ast)$ we can refine some of the previous details.

Proposition: Assume $(\ast\ast)$. Then $(\ast)$ holds for $g$ if and only if $\delta$ has a left homotopy inverse if and only if $\Sigma X\simeq \Sigma A\vee \Sigma Y$ under $\Sigma A$.

This gives three equivalent conditions for $(\ast)$ to hold. I'll stress that everthing is true under the more general assumptions I spelled out above.
Here is an example of where this can be put to use. Recall that $S^m\times S^n$ is formed from $S^m\vee S^n$ by attaching an $(m+n)$-cell along the Whitehead map $w:S^{m+n-1}\rightarrow S^m\vee S^n$. The map we will be interested is the collapse map $g:S^m\times S^n\rightarrow S^{m+n}$ which pinches to the top cell.
Then we have a homotopy cofibration sequence
$$S^{m+n-1}\xrightarrow{w} S^m\vee S^n\rightarrow S^m\times S^n\xrightarrow{g}S^{m+n}\xrightarrow{\delta\simeq\Sigma w}S^{m+1}\vee S^{n=1}\rightarrow\dots$$
It's well-known that $\Sigma w\simeq\ast$. So by our results above we have

Proposition: The collapse map $g:S^m\times S^n\rightarrow S^{m+n}$ is a homotopy epimorphism.

Of course we obtain the well-known homotopy equivalence $\Sigma(S^n\times S^n)\simeq S^{m+1}\vee S^{n+1}\vee S^{n+m+1}$, only now we have some insight into where this is coming from.
