Let Y~ be the ordered pairs [a,p] where a is in X and p is a path in Y starting at f(a). Give the paths of Y the compact open topology. Apply the product topology of X crossed with these paths, then take the subspace that is Y~.
Since f is continuous, X separates into components according to the components of Y. These then imply components in X cross the paths of Y. Thus Y~ separates into components according to the components of Y. We will see that projection maps components into corresponding components. Also, functions are continuous iff they are continuous per component, and the space Y~ is hurewicz iff it is hurewicz per component. Finally, Y~ and X are homotopy equivalent if they are homotopy equivalent per component. Thus we can assume, without loss of generality, that Y is a single connected component. And since Y is locally path connected, Y is a single path component.
Restrict attention to the constant paths p = f(a). The compact open topology reproduces the open sets of Y, and becomes homeomorphic to Y. The resulting subspace of Y~ is essentially X,f(X). Project this onto X and get a continuous bijection. An open set in X has a preimage drawn from X cross all the paths of Y, which is open. Conversely, start with a base open set in X,f(X). This is open in X, and projects to the same open set in X. The map is bicontinuous, and a homeomorphism. Thus a copy of X lives in Y~.
To review, X injects into Y~ using constant paths, and Y~ projects back onto X. The composition of these continuous functions is the identity map on X. Compose them in the reverse order and map Y~ onto X,f(X). At the same time, a homotopy contracts all the paths in Y~ linearly back to their base points, giving X,f(X). Is this homotopy continuous? That's the tricky part.
Take a point a and a path p starting at f(a), and a time t, and create a contracted path q, which is p up through time t. When put into standard form, q is the image of [0,1]. Extend q a little bit, buy running it faster, and traveling a little bit farther along p. This is p up through time t+ε. Slow q down a bit, and you have p through time t-ε. Remember that q is part of an open set W in Y~. Thus q satisfies finitely many compact-open constraints simultaneously. Let's look at one of these constraints. A closed set K in the unit interval becomes q(K) in an open set U in Y. The key is that every path into Y is continuous. The preimage of U under q is an open set containing K. Since K is compact, finitely many open intervals cover K. Merge overlapping intervals, so we have finitely many disjoint open intervals covering K. Since K is closed, each interval extends a certain distance beyond K, on the left and/or the right. Take the least of these distances, and K could shift by this much, left or right, and still lie within the open intervals. Thus K could shift, left or right, and q would still map it into U. Seen another way, q, extended or contracted by ε, still maps K into U. This happens for finitely many constraints, so take the least ε. Now a,p,(t-ε,t+ε) maps into W. In other words, a,p,t can be smeared out in time, by t-ε through t+ε, and the result is still in W. Of course we need not shrink p if t is 0, and we need not extend p if t = 1. Use some common sense at the boundaries.
Again, focusing on a particular K and U, let K+ be K shifted left and right through ε/2. This is still compact. Build an open set V based on the functions from K+ into U, for all our KU constraints simultaneously. Cross V with the open time interval (t-ε/2,t+ε/2). If a path maps K+ into U, then it certainly maps K into U. The same holds if we shift the path by ±ε/2. Thus the entire image lies in W. Our arbitrary point a,p,t lies in a base open set that maps into W, hence the homotopy is continuous. Therefore X and Y~ are homotopy equivalent.
Now we need to prove Y~ is hurewicz. Let p(Y~) take X cross a path to the end of the path in Y. Is this continuous? Fix an open set U in Y. The endpoint 1 in the interval[0,1] is compact, hence the functions that end in U form an open set. The preimage of an open set is open, and the projection p is continuous.
Let ht(Z) be a homotopy of Z into Y, and let g0(Z) into Y~ be a lift of h0(Z). For each c in Z, g0(c) is a point a in X, and a path in Y that starts at f(a) and ends at h0(c). Lifting the homotopy is relatively straightforward. Restrict h to c and the homotopy becomes a path in Y from h0(c) to h1(c). Use this to extend the path from f(a) to h0(c). This establishes gt(c), and hence gt(Z).
As usual, there is the pesky business of continuity. I'm going to prove p is bicontinuous. Then, the preimage of an open set W upstairs is the preimage of p(W) downstairs, which is open.
Let W be a base open set, which is the cross product of an open set O in X and an open set in the paths of Y. This is the intersection of O crossed with finitely many KU constraints. If each of these projects to an open set in Y, then their intersection is open, and p is bicontinuous.
Assume K does not contain 1. Being closed, K is bounded away from 1. Let a function map K into an open set U in Y. From here, the path can extend to touch every point of Y. This is an open set, hence the image is open in Y.
Assume K contains 1. Again, some function maps K into U, an open set in Y. Modify this path to touch every other point of U. (If l is the leftmost point of K, move from f(a) into U, from 0 to l, and move to any point of U thereafter, from l to 1. If l = 1, the preimage of an open set U is a closed point, which is impossible.) The image is U, which is open in Y. Put this all together and the image of W is open. Therefore p is bicontinuous, the lifted homotopy is continuous, and Y~ is hurewicz. That completes the proof.