I haven’t read the note linked by Rob Arthan, but I feel like it’s much too long for the result itself, so I wanted to add a “self-contained” proof. Let $q: Y \rightarrow X, p: Z \rightarrow Y$ be covering maps, write $r=q \circ p: Z \rightarrow X$.
Assume that $X$ is connected, locally path-connected, and semilocally simply connected. Then so are $Y,Z$ and $X$ has a universal cover $W$, write $u: W \rightarrow X$. As $W$ is the universal cover, there is some $q’: W \rightarrow Y$ such that $q \circ q’=u$. It’s not very hard to see that $q’$ is a covering map, and thus that $W$ is the universal cover of $Y$ as well.
By the same reasoning, there is some covering map $p’: W \rightarrow Z$ such that $p \circ p’=q’$. In particular, $r \circ p’=u$, with $p’$ and $u$ covering maps.
The map $r_*: \pi_1(Z) \rightarrow \pi_1(X)$ is a composition of injective maps so is injective. Note that by composition, paths and homotopies lift along $r$. Let $H$ be its image, and let $Z’ \rightarrow X$ be a covering map (witg $s: W \rightarrow Z’$) corresponding to $H$.
Now, it’s easy to see that if $x,x’ \in W$, with $u(x)=u(x’)$, their images in $Z$ are equal iff any path from $x$ to $x’$ is a loop in $Z$, iff the image (under $u$) of some path from $x$ to $x’$ is in the image in $\pi_1(X)$ of the loops of $Z$, iff the image under $u$ of some path from $x$ to $x’$ is in $H \leq \pi_1(X)$. So the images of $x,x’$ in $Z$ are equal iff their images in $Z’$ are equal.
It follows that $W \rightarrow Z \rightarrow X$ and $W \rightarrow Z’ \rightarrow X$ are isomorphic, and thus that $r$ is a covering map.