Let $U_{i}$ be a bounded path component of $X = \mathbb{R}^2 \setminus J,$ and assume $\partial U_{i} \neq J.$ Choose a point $c \in U_{i}.$ Use the retraction $r,$ we define the function $f: \mathbb{R}^2 \rightarrow \mathbb{R}^2 - \{c\} $ by the rule $$ f(\mathbf{x}) = \begin{cases} r(\mathbf{x}) & \text{if } x \in \overline{U_{i}} \\ \mathbf{x} & \text{if } x \in \mathbb{R}^2 \setminus U_{i} \end{cases} $$
Show that the function $f$ is well-defined and continuous.
My previous knowledge is:
I know that $\partial U_{i}$ is either all of $J$(where $J$ is a Jordan curve) or it is contained in an arc $A \subseteq J.$
And this question explains some prior knowledge:
Show that $\partial U_{i}$ is either all of $J$ or it is contained in an arc $A \subseteq J.$
My questions are:
1-Should not the $\mathbf{x}$ and the $x$ in the question be the same?
2- I know that the retraction is a continuous function by definition and I know that the identity function is also a continuous function. Does this implies that our $f$ is continuous? But it is a piecewise function. Could anyone help me with the proof of continuity please?
3-I know that to show that a function is well-defined you have to start with $x=y$ and ends up with $f(x) = f(y)$.... I am not sure how to implement this in our case. Could anyone help me with this proof also?
EDIT:
I was given this hint for the solution of this problem : $\overline{U_{i}}$ and $X \setminus U_{i}$ are both closed in $\mathbb{R}^2$
Note that you need to show "well-defined" before you examine continuity, since you can hardly show that the limit as you approach the boundary is the function value at the boundary before you have established there is a function value at the boundary. (Besides which, in this case, knowing that the two pieces agree on the boundary is critical to proving continuity there.)