We just need to prove that the fundamental group satisfies two properties below.
If $\text{id}:(M,x_0)\to(M,x_0)$, then $\text{id}_*=\text{id}:\pi(M,x_0)\to\pi(M,x_0)$.
If $f:(L,x_0)\to(M,y_0)$, $g:(M,y_0)\to(N,z_0)$, then $(g\circ f)_*=g_*\circ f_*:\pi(L,x_0)\to\pi(M,z_0)$.
So if $f$, $g=f^{-1}$ are homeomorphism, then
$$\text{id}=\text{id}_*=(f\circ g)_*=f_*\circ g_*$$
$$\text{id}=\text{id}_*=(g\circ f)_*=g_*\circ f_*$$
Now we get the conclusion.
Actually the proof is based on the theory of functor: http://en.wikipedia.org/wiki/Functor.
If you want prove it by the homotopy, I shall give the next theorem.
Theorem Suppose $f$, $g:M\to N$ are continuous, and $H$ is the homotopy map between them. For any $q\in X$, let $h$ be the path in $Y$ from $f(q)$ to $g(q)$ defined by $h(t)=H(q,t)$. Now we have an isomorphism between $\pi(X,f(q))$ and $\pi(Y,g(q))$.
You can find clue in the Lee's book: Introduction to Topological Manifold, P164.