Let $p\colon X\rightarrow Y$ be a covering map where $X$ and $Y$ are path connected. Show that there exists a map $q\colon Y\rightarrow X$, such that $q\circ p=1_{X}$ if and only if $p$ is a homeomorphism.
Suppose $p$ is a homeomorphism then there exists a continuous inverse map $p^{-1}\colon Y\rightarrow X$. Since $p$ is a covering space it is a surjective, continuous map. Therefore we can let $q=p^{-1}$ and we get $q\circ p=1_{X}$.
Now suppose that there exists a map $q\colon Y\rightarrow X$ such that $q\circ p=1_{X}$. We know that $p$ is a covering map therefore $p$ is a continuous, surjective map. To show that $p$ is a homeomorphism we have to show that $p$ is also injective. Suppose $p(x_{1})=p(x_{2})$ for some $x_{1},x_{2}\in X$. We need to show that $x_{1}=x_{2}$ and I'm not how to show this?
Any advice would be appreciated. Thank you.