Hatcher, Example 2C.4, rotation of the 3-genus orientable surface 
My question is about the above example. I can't understand how the map $g$ (in the underlined sentence) is defined, and also why it is homotopic to the identity. I want some more explanation. Thanks in advance.
 A: This is written sort of backwards to the way I understand it. We want the following things to be true of our map $g$: 


*

*It should be the identity outside a disk containing $x$ and $y$.

*It should equal $f$ in a neighborhood of $x$.

*It should be homotopic to the identity.

*It should be a homeomorphism.
I'll try to not only explain the construction, but how I got there from what is written.

Point 1 forces our hand. Choose some disk on the surface with $x$ and $y$ in its interior. We will define $g$ to be the identity outside this disk. 
For point 2, we need to choose some neighborhood of $x$ on which $g$ will agree with $f$. In compliance with points 1 and 4, we need both this neighborhood and its image under $f$ to be contained in the chosen disk. Fortunately, continuity allows us to choose such a neighborhood, $N$. At this stage, we know that $g$ will send $N$ to $f(N)$, but we don't know exactly how this will happen.  
3 and 4: Homeomorphisms which are homotopic to the identity bring to mind stretching/squishing/smearing your space. This gives some insight to the last sentence of the previous paragraph:
Take the disk with the two regions $N$ and $f(N)$ labeled. Now, imagine $N$ sliding over to $f(N)$ continuously, with the rest of the disk deforming/stretching/squishing through this movement so that the boundary is fixed, and the entire movement of the disk is continuous. Clearly, the map given by the end of this process is homotopic to the identity, as it is defined using a homotopy. 
This map $g$ will be the identity outside the disk, and the above map inside the disk. 

I'm not sure how well I explained that because it is very visual. I'm happy to answer any additional questions.
Edit: There are some subtlties I have swept under the rug in the paragraph that starts "Take the disk...," but for the moment I'm going to bed. I'd be happy to expound on them tomorrow if you'd like. 
