TOPOLOGY by Munkres Lemma $58.4$ I can understand the steps but I can't  understand  how .  The  problem  is  their  approach  is  not  clear  to  me, why he  did  it  that  way . 
When  $h$  and  $k$  are  given  to  be  homotopic  and $$h(x_0)=y_0\\and\ \ k(x_0)=y_1$$. $f$  is  a  loop  at  $x_0$  then  will  not  $(h\circ f)$  and  $(k\circ f)$  be  homotopic $?$  Now  what  we  have  to  prove  is  that  the  path  $\alpha$  between  $y_0$  and  $y_1$ .  We  have  to  show  that traversing  the  path  $\alpha * (k\circ f)$  and  the  path $(h\circ f)* \alpha $  are  same  homotopically . So  , in  my  guess, the whole  operation happens  in  the  range  space $Y$  and  not  in  $X$ . 
Can  somebody  please  explain  the  method  of  Munkres  to  me . :(
The pics of  proofs  from  Munkres  :

 A: Let's give it another go and see if I can properly answer it.
What he does is that he starts by defining the space of the unit square in order to create tools he can work with, this is because the unit square have very evident homotopy within it between all paths. From this he creates a function from the unit square to $X\times I$ because after all, that is where we are wroking and what he wants to prove is that the homotopy between $h$ and $k$ creates the path we want. Why it is $X\times I$ is because that is the space homotopies are, with $h\cong k$ we have $H:X\times I\to Y$, this one is given.
After this he creates paths along the edges of the unit square which are c hoosen such that the function from the unit square to our $X\times I$ will match up with the given functions $f_0$ and $f_1$. As it is the unit square all paths will be homotopic (as it is convex), which is the fundamental reason he wanted to work in this space. This is also where he shows that the homotopy $G$ in the unit square satesfies it and through composition gives the homotopy and path we need in $Y$
Any better?
