Gluing homotopies on the 2-sphere Let $A$ and $B$ be the closed upper and lower hemispheres of $S^2$ respectively.  Suppose that we are given two maps $f,g : S^2 \to S^2$ with $f(A), g(A) \subseteq A$, and $f(B), g(B) \subseteq B$.  Also suppose that $f|_A \simeq g|_A$, $f|_B \simeq g|_B$, $f|_{A \cap B} \simeq g|_{A \cap B}$ (where here we are considering $f$ and $g$ as maps from $A \to A, B \to B, A \cap B \to A \cap B$ respectively).  Does it then follow that $f \simeq g$? 
Is there a general result that would imply this that I should know about?  Or is there a nice way to just "glue the homotopies together by hand"?  

I assume statements like "$f|_A \simeq g|_A$" means that there is a homotopy between $f$ and $g$ of maps $A \to A$.
Consider the Mayer-Vietoris sequence for $S^2 = A \cup B$, which gives a natural isomorphism $H_2(S^2) \cong H_1(A \cap B)$. Naturality implies that the isomorphism commutes with $f_*$ and $g_*$, so if $f|_{A \cap B}$ and $g|_{A \cap B}$ induce the same maps $H_1(A \cap B) \to $, then the maps $f_*,g_* \colon H_2(S^2) \to H_2(S^2)$ are equal. But the degree uniquely specifies the homotopy class of a map $S^2 \to S^2$, so $f \simeq g$.
This holds more generally if $X$ is the suspension $SY$ of a connected CW complex $Y$; then if $f,g \colon SY \to SY$ map each half of $SY$ into itself, and their restrictions to $Y \subset SY$ are homotopic in $Y$, then $f$ and $g$ induce the same maps on homology, by the above argument (since $H_{n+1}(SY) \simeq H_n(Y)$. Then since $SY$ is simply connected, the two maps must be homotopic.
