This is from Munkres section 51 problem 2b
Given spaces $X$ and $Y$ let $[X,Y]$ denote the set of homotopy classes of maps of $X$ into $Y$. Show that if $Y$ is path connected, the set $[I,Y]$ has a single element. Here $I=[0,1]$.
My approach to the problem is as follows. Let $f,g \in [I,Y]$ and $f,g:I \to Y$ be continuous functions. First I define a function $F(x,t)=f(x(1-t))$. Hence $F(x,0)=f(x)$ and $F(x,1)=f(0)$. This show that $F$ is a homotopy from $f$ to $e_{f(0)}$. Likewise, define $G(x,t)=g(xt).$ Here $G(x,1)=g(x)$ and $G(x,0)=g(0)$. This shows that $G$ is a homotopy from $g$ to the constant function $e_{g(0)}$. Since $Y$ is path connected we can find a path that forces a homotopy between $e_{g(0)}$ and $e_{f(0)}$. Hence $f\cong e_{f(0)}\cong e_{g(0)} \cong g$.
Is this the right strategy?