Connectedness proofs have given me trouble for far too long. Does anyone have good insights on how to go about proving a set is connected? I know that is a broad question, any insight at all would be helpful. I have provided a specific question below that can be used to elaborate on, one that seems pretty simple, yet I haven't had any luck.
Let $A,B$ be two closed subsets of $\mathbb{R^n}$ such that $A \cup B$ and $A \cap B$ are connected. Prove that $A$ is connected.
Some thoughts I've had:
Start by assuming that $A$ is not connected. Then $A = B \cup C$ where $B$ and $C$ are disjoint nonempty open sets. From here, proofs usually consider an element $b \in B$ and $c \in C,$ construct a few supplementary sets which then are used to show that a contradiction (usually $B$ or $C$ must be empty or non-disjoint). I've tried creating such supplementary sets, but haven't had any luck.