The image of a connected space under a continuous map is connected.
My attempt:
Approach(1): let $f:X\to Y$ be a continuous map. Let $A\subseteq X$, $A$ is connected. Assume towards contradiction, $f(A)$ is not connected i.e. $\exists P,Q\in \mathcal{T}_{f(A)}$ such that $P,Q\neq \emptyset$, $P\cap Q =\emptyset$ and $P\cup Q=f(A)$. Let $P=f(A)\cap R$ and $Q=f(A)\cap S$, where $R,S\in \mathcal{T}_Y$. Claim: $A\cap f^{-1}(R)$ and $A\cap f^{-1}(S)$ form a separation of $A$. Proof: $A\cap f^{-1}(R), A\cap f^{-1}(S)\in \mathcal{T}_A$, because $f^{-1}(R),f^{-1}(S)\in \mathcal{T}_X$ by continuity of $f$. Since $P\neq \emptyset$, $\exists y\in f(A)\cap R$. So $\exists x\in A$ such that $f(x)=y$. We also have $f(x)=y\in R \Rightarrow x\in f^{-1}(R)$. So $x\in A\cap f^{-1}(R)\neq \emptyset$. Similarly $A\cap f^{-1}(S)\neq \emptyset$. Since $P\cap Q=f(A)\cap (R\cap S)=\emptyset$, we have $f(A)\subseteq Y- (R\cap S)$. By exercise 2 section 2, $A\subseteq f^{-1}(f(A))\subseteq f^{-1}(Y-(R\cap S))=f^{-1}(Y)-f^{-1}(R\cap S)=X-f^{-1}(R\cap S)$. Which implies $A\cap f^{-1}(R\cap S)=(A\cap f^{-1}(R))\cap (A\cap f^{-1}(S))=\emptyset$, again by exercise 2 section 2. Thus $A\cap f^{-1}(R)$ and $A\cap f^{-1}(S)$ is disjoint. Since $P\cup Q=f(A)\cap (R\cup S)=f(A)$, we have $f(A)\subseteq (R\cup S)$. So $A\subseteq f^{-1}(f(A))\subseteq f^{-1}(R\cup S)$. So $(A\cap f^{-1}(R)) \cup (A\cap f^{-1}(S))= A\cap f^{-1}(R\cup S)=A$, by exercise 2 section 2. Thus union of $A\cap f^{-1}(R)$ and $A\cap f^{-1}(S)$ is $A$. Indeed $A\cap f^{-1}(R)$ and $A\cap f^{-1}(S)$ form separation of $A$. Which contradicts our initial assumption of $A$ is connected. Is this proof correct? This proof is slight variation of Munkres’ proof.
Approach(2): let $h:X\to Y$ be a continuous map. $A\subseteq X$ and $A$ is connected. By theorem 18.2, map $f:A\to f(A)$ defined by $f(x)=h(x), \forall x\in A$ is continuous. Assume towards contradiction $f(A)=h(A)$ is not connected. Then $\exists g:f(A)\to \{0,1\}$ such that $g$ is continuous and $g(f(A))=\{0,1\}$. So $g\circ f:A\to \{0,1\}$ is continuous, by theorem 18.2(c), but not constant. So $A$ is not connected. Which contradicts our initial assumption. Is this proof correct?
To change your approach $2$ into a direct proof, you can do it like that. :
Let $h : X \rightarrow Y$ be continuous, and $A \subset X$ be connected. Let $g : h(A) \rightarrow \lbrace 0,1 \rbrace$ be continuous. Then $g \circ h : A \rightarrow \lbrace 0,1 \rbrace$ is continuous, and since $A$ is connected, then $g \circ h$ must be constant over $A$. But hence $g$ is constant, and hence you deduce that $h(A)$ is connected.