Exercise :
Let $(X,\|\cdot\|)$ be a normed space and $V\subseteq X$. The distance of one point $x \in X$ to $V$ is defined by : $$d(x,V)=\inf\{\|x-v\|: v \in V\}$$ Show that if $f \in X^*=B(X,\mathbb R)$ which is the space of the bounded linear functionals, thefe for all $x \in X$ it is : $$d(x,\ker f)=\frac{|f(x)|}{\|f\|}$$
Attempt - thoughts :
So, first of all, since $f$ is a bounded linear functional, then there exists some $M>0$ such that :
$$\|f(x)\| \leq M\|x\|$$
Also, the operator norm is given by :
$$\|f\| = \sup\bigg\{\frac{\|f(x)\|}{\|x\|} : x \in X, x \neq 0\bigg\}$$
Now, the kernel of the function $f$ is defined as :
$$\ker f = \{x \in X : f(x) = 0\}$$
Essentialy, we need to calculate :
$$d(x,\ker f) = \inf\{\|x-v\|:v \in \ker f\}$$
Now, of course, the kernel of $f$ is a subspace of $X$ and also, we know that : $$\text{co}\dim\{\ker f\} = 1$$
I can't see how to combine these facts yielded by the hypothesis of the exercise, though, to continue to an attempted solution.
Any hints, tips or thorough elaborations will be greatly appreciated !
hint: without loss of generality, assume $\|f\|=1$. It is clear that $|f(x)|\le \|v-x\|$ for every $v\in $ker$f$. For the reverse inequality, note that there is a vector $z\in X$ such that $|f(z)|>1-\epsilon$ for any $\epsilon>0.$ For $x\neq 0,\ $ set $v = x-\frac{f(x)}{f(z)} z$ and observe that $v\in $ker$f$.