How continuity of $f$ and path-connectedness of $g$ results in $f\circ g$ to be path-connected? Theorem 6.29 (p.213) of Introduction to Topology: Pure and Applied by C Adams and R Franzosa says:

Assume that $f : X \rightarrow Y$ is continuous and $X$ is path connected. Then $f (X)$ is a path connected subspace of $Y$.
Proof. Let $p$ and $q$ be points in $f(X)$. Pick points $x \in {f}^{-1} ({\{p\}})$ and $y \in {f}^{-1} ({\{q\}})$. Since $X$ is path connected, there exists a path $g: [0, 1] \rightarrow X$ from $x$ to $y$. Then $f\circ g$ is a path in $f(X)$ from $p$ to $q$.

What I don't understand is the last sentence of the proof. How continuity of $f$ and path-connectedness of $g$ results in $f\circ g$ to be path-connected?
 A: You are confusing your terms:


*

*Topological spaces are connected and/or path connected. "Connected" is not an adjective that can be applied to a function

*Functions can be continuous or not. "Continuous" is not an adjective that can be applied to a topological space.


That said, what you need to prove is that $f(X)$ (which is a set) is path connected. Therefore, you need to prove, for two points $p, q$ in $f(X)$, that there exists a path in $f(X)$ from $p$ to $q$ (i.e., a continuous function $\gamma$ from $[0,1]$ to $f(X)$ such that $\gamma(0) = p$ and $\gamma(1) = q$).


*

*Do you understand that:


*

*$f\circ g$ is continuous?

*$f\circ g$ maps from $[0,1]$ to $f(X)$?

*$(f\circ g)(0) = p$?

*$(f\circ g)(1) = q$? 


*Do you understand that from these four points, it follows that $f\circ g$ is a path from $p$ to $q$?

*Do you understand that from 2., it follows that $f(X)$ is path connected?
If you answer any of these questions with "no", please explain in the comments which part is confusing you.
A: Here's a picture. Hope it helps.
$~~$ 
A: See definition of the path. For a space to be path-connected, for every two points you have to have a continuous something connecting two points. You can do it in $X$ by assumption. Now $f\circ g$ is continuous as a composition of two continuous functions. It also connects necessary points because $g$ does.
