Let $(X, d)$ be a metric space. Let $τ$ be the metric topology on $X$ induced by $d$. For $A ⊆ X$ , let $d(x, A) := \inf_{a∈A} d(x, a) $ for $x ∈ X$
(a) If $f (x) := d(x, A)$ (for a fixed subset A) then show that $f : (X, τ ) → R $ is a continuous mapping.
(b) If every infinite bounded set in $X$ has a limit point (in $X$) and $A$ is closed (in $(X, τ )$ ) then show that for each $x ∈ X$ there exists an element $a_0 ∈ A $ such $d(x, A) = d(x, a_0)$.
I have no clue how should I even approach to this. A detailed solution would be great.