TITLE: Composition of two continuous, surjective functions, which is a covering map
QUESTION [5 upvotes]: I'm stuck with the following problem (number 12.21.1 of Topologia-Marco Manetti, 2008 edition):

Let $p:E \to F$ and $q:F \to X$ two continuous, surjective functions, where $E,F,X$ are connected and locally path connected topological spaces. Prove that, if $qp:E \to X$ is a covering map, then also $p$ and $q$ are covering maps.

What I was thinking about is to take $x \in X,$ and an open set $V \subset X, x\in V$, which respects the covering condition, and the counterimage through $qp$ of $V.$
Then, since $(qp)^{-1}(V)=\bigcup_{i \in I}C_i,$ where $C_i$ are all connected components such that $qp|_{C_i}:C_i \to V$ are homeomorphisms, I obtained that $p|_{C_i}$ is injective.
I made a quite similar reasoning taking the counterimage of $V$ through $q,$ but I couldn't reach very satisfying results. Someone also told me that it doesn't really seem to be true. Thanks to everybody.

REPLY [6 votes]: Here are some counter-examples:
Let $f\colon Y\to X$ be a non-trivial covering map and suppose that $X$ has a non-isolated point $x\in X$. Furthermore, let $y,y'\in Y$ be two distinct points in the fibre over $x$. Then $f$ factors through the space $Z:=Y/\{y,y'\}$ obtained from $Y$ by identifying $y$ and $y'$, via the projection map $\pi\colon Y\to Z$ and a unique, continuous map $g\colon Z\to X$ such that $g\circ \pi = f$. Both are surjective.
However, $g$ is not a local homeomorphism near $\pi(y)=\pi(y')$ (unless $x\in X$ is isolated) and $\pi$ is not a covering map over $\pi(y)=\pi(y')$. (It's particularly easy to see in the special case where $ f$ is finite, since a covering map has to have locally constant number of fibres; clearly, $g$ and $\pi$ don't.)