Proof (continuous image of path-connected set is path-connected)

For any $y_1,y_2\in f(X)$, let $y_1 = f(x_1)$ and $y_2 = f(x_2)$. Since $X$ is path-connected, there exists a continuous function $γ: [0,1]\to X$ where $γ(0) = x_1$ and $γ(1) = x_2$. Then $\tilde y = f \circ γ: [0,1] \to Y$ is a composition of continuous functions and thus continuous, and $\tilde γ(0) = y_1$ and $\tilde y(1) = y_2$.