Prove that if $x \in \operatorname{cl}_X(A)$, where $A$ is a connected subspace of a topological space $X$, then $A \cup \{x\}$ is connected.
My attempt:
Suppose, in order to find a contradiction, that $B \cup C = A \cup \{x\}$ where $B,C$ are open in $A \cup \{x\}$ non empty and disjoint.
Then, we have either $A \subseteq B$ or $A \subseteq C$. Indeed, if this wouldn't be the case, then both $A \cap C$ and $A \cap B$ are non empty, and then
$A = A \cap (B \cup C) = (A \cap B) \cup (A \cap C)$ gives a union of disjoint non empty open (in A) sets, contradicting the connectedness of $A$.
Without loss of generality, we may assume that $A \subseteq B$. Then $x \in C$, or else $A \cup \{x\} = B$, meaning that $C = \emptyset$, which isn't possible.
Write $C = G \cap (A\cup \{x\})$ with $G$ open in $X$. Because $x \in \operatorname{cl}(A)$, and $x \in G$, it follows that $A \cap G \neq \emptyset$. Pick $y \in A \cap G$. Then $y \in A \subseteq B$ and $y \in A \cap G \subseteq C$, so $y \in B \cap C$. This is the desired contradiction.
Is this correct?
The proof you gave is fine, I think. One can prove something slightly more general:
My preferred proof uses the following well-known characterisation of connectedness:
Let $f: D \to \mathbf{2}$ be continuous. Then we know that $f|A$ is constant with value $i_A \in \{0,1\}$. So $f$ and the constant function with value $i_A$ agree on $A$, both are continuous, and as $A$ is dense in $D$ (from $D \subseteq \overline{A}$) and $\mathbf{2}$ is Hausdorff, another classic theorem says that $f$ agrees with the constant map with value $i_A$ on the whole of $D$. So, $f$ is constant, and $D$ is connected. In particular $\overline{A}$ is connected.