Pullback covering space of a CW complex

This is an old qual exam question from 2017: let $$X$$ and $$Y$$ be connected CW complexes, let $$p: \tilde{X} \to X$$ be a path-connected covering space, and let $$f: Y \to X$$ be a continuous map. The first part of the question asks to show that the pullback $$Y \times_X \tilde{X}$$, equipped with the projection map, is a covering space of $$Y$$. The solution to this part seems to only require continuity of $$f$$ and that $$p$$ is a covering map, so there are many hypotheses left unused for the second part, where I'm stuck: let $$(y,\tilde{x}) \in Y \times_X \tilde{X}$$, and let $$x = f(y) = p(\tilde{x})$$. If $$f_* \pi_1(Y,y) \subset p_* \pi_1(\tilde{X},\tilde{x})$$ and the covering $$p: \tilde{X} \to X$$ is nontrivial, show that $$Y \times_X \tilde{X}$$ is disconnected.

The hypothesis about fundamental groups means that we have a lift $$\tilde{f}: Y \to \tilde{X}$$ satisfying $$p \tilde{f} = f$$. I also know that, since $$Y$$ is connected, any two lifts which agree at a point of $$Y$$ are in fact the same lift. Also, since $$Y \times_X \tilde{X}$$ is a covering space of a CW complex, it can be endowed with a CW complex structure as well, so connected components correspond to path-connected components. I was thinking of maybe showing that $$(y,\tilde{x}_1)$$ and $$(y,\tilde{x}_2)$$, where $$\tilde{x}_1,\tilde{x}_2$$ are distinct lifts of $$x$$, lie in different path-connected components by somehow drawing a contradiction from a path connecting the two? Any help would be appreciated!

Associated to any covering space $$p:A \rightarrow B$$ with fiber $$F$$, we get part of a long exact sequence of pointed sets: $$\pi_1(A) \xrightarrow{p_*}\pi_1(B) \xrightarrow{\partial} \pi_0(F) \xrightarrow{i_*} \pi_0(A)$$. The $$\partial$$ can be described via the lifting properties of your space, and it is enlightening to figure it out.

In your case, we have two such exact sequences:

$$\pi_1(\bar{X}) \xrightarrow{p_*}\pi_1(X) \xrightarrow{\partial} \pi_0(F) \xrightarrow{i_*} \pi_0(\bar{X})$$

$$\pi_1(Y \times _{X}\bar{X}) \xrightarrow{(p_Y)_*}\pi_1(Y) \xrightarrow{\partial} \pi_0(F) \xrightarrow{i_*} \pi_0(Y \times _{X}\bar{X})$$

where $$F$$ occurs in both since the fiber in both is the same.

It turns out that these sequences are natural with respect to maps between covering spaces that respect the fiber. This means that your $$f:X \rightarrow Y$$ induces a commutative square:

$$\require{AMScd}$$ $$\begin{CD} \pi_1(Y) @>{\partial}>> \pi_0{F}\\ @VVV @VVV\\ \pi_1(X) @>{\partial}>> \pi_0{F} \end{CD}$$

where the map on the fiber is a bijection (this can be checked from the definition of pullback).

What this implies is that I can factor the boundary map $$\pi_1(Y)\rightarrow \pi_0(F)$$ through $$\partial \circ f_*$$.

Now we finally use some of the conditions specified. Since the image of the fundamental group under $$f$$ is contained inside the image of the fundamental group of the covering space, we can lift $$f$$ up to $$\bar{X}$$. This means that the image of $$f_*:\pi_1(Y) \rightarrow \pi_1(X)$$ is contained inside the image of $$p_*: \pi_1(\bar{X})\rightarrow \pi_1(X)$$. Since the sequences are exact, this implies that the composition is 0, and so $$\partial: \pi_1(Y) \rightarrow \pi_0(F)$$ is the map sending everything to the path component of the basepoint of the fiber.

Since the sequence is exact, this implies that the only element of $$\pi_0(F)$$ sent to the path component of the basepoint in $$Y \times _{X}\bar{X}$$ is the path component of the basepoint in $$F$$. Since the initial covering was nontrivial, the fiber has multiple components, so there are at least two path components of $$Y \times _{X}\bar{X}$$.