A corollary of the Hahn-Banach theorem Let $Z$ be a subspace of normed linear space $X$ and that $y$ is an element of $X$ whose distance from $Z$ is $d$. Then there exists a $\Lambda \in X^* $ (the dual space of $X$) so that $\| \Lambda\| \leq 1$, $\Lambda(y) = d$ and $\Lambda(z) = 0$ for all $z \in Z$.
This corollary is left as an exercise to the reader in chapter 3 of Reed and Simon's Functional Analysis, Corollary 3, page 77. I assumed that this corollary would be short and have relatively simple ideas as the previous 2 corollaries which were proved, but after multiple fruitless attempts I tried to find some solutions online to similar problems.
First I found some variations of the problem, for instance if $Z$ is closed, then one can define a linear functional $\lambda$ from $\operatorname{span}\{ y, Z \}$ to $\mathbb{R}$ by noting that each $x \in \operatorname{span}\{ y, Z \}$ can be written as a unique linear combination $x = \alpha y + z$ where $\alpha \in \mathbb{R}$ and $z \in Z$. Now define $\lambda$ by
$$ \lambda (\alpha y + z) = \alpha$$
This is a linear functional and the kernel of $\lambda$ is the closed subspace $Z$ and hence $\lambda$ is also continuous. The solution then refers to some theorem in which it was proved that 
$$\| \lambda \|_{\operatorname{span}\{ y, Z \}} = \frac{1}{d(0, \lambda^{-1} \{1 \})}$$
Since $\lambda^{-1} \{ 1 \} = y + Z$ it follows that
$$ \| \lambda \|_{\operatorname{span}\{ y, Z \}} = \frac{1}{d(0, y + Z)} = \frac{1}{d(y,Z)} = \frac{1}{d}$$
Now we have $\lambda(y) = 1$, $\lambda(z) = 0$ for all $z \in Z$ and $\| \lambda \|_{\operatorname{span}\{ y, Z \}} = \frac{1}{d}$. By an earlier corollary we may now extend the functional $\lambda$ to a  functional $\lambda'$ on the whole space $X$ and furthermore $\| \lambda'\|_X = \| \lambda \|_{\operatorname{span}\{ y, Z \}}$. Now if we define
$$ \Lambda(x) = d \lambda' (x)$$
then $\Lambda$ has the desired properties.
This solution is fine as is, but the book I am using does not mention either of the two important steps (kernel is closed is equivalent to continuity, and the lemma for the relationship between the norm of $\lambda$ and preimage of $1$), so I am unsure if this was the method they had in mind. I am also unsure as to how to force a closed subspace. One method might be for instance to define the functional $\lambda$ from $\overline{\operatorname{span} \{ y, Z\}}$.
Does anyone have a completely alternate, perhaps simpler solution, or a way to dodge the fact that subspace $Z$ is not closed?
 A: Two answers. First, you can easily derive the general case from the case where $Z$ is closed. Second, and I think more important, $Z$ being closed is really irrelevant in the first place!
(i) You can derive the general case from the case where $Z$ is closed:
If $d=0$ you can just set $\Lambda=0$ and you're done. 
Suppose $d>0$. Then $y\notin\overline Z$. And $d$ is also the distance from $y$ to $\overline Z$. Apply your argument to $y$ and $\overline Z$.
(ii) It really doesn't matter whether $Z$ is closed or not.
You start by defining $\lambda$ on the span of $Z$ and $y$ by 
$$\lambda(\alpha y+z)=\alpha d\quad(\alpha\in\Bbb R, z\in Z).$$
(You said $\alpha$, but it should be $\alpha d$ if you want $\lambda y=d$.)
As far as I can see, the only place you used the fact that $Z$ was closed was in showing that $\lambda$ is continuous. But $\lambda$ is clearly continuous, just from the definition. Saying $d$ is the distance from $y$ to $Z$ implies that $||y+z||\ge d$ for all $z\in Z$. Hence $||\alpha y+z||\ge|\alpha|d$. So $$|\lambda(\alpha y+z)|=|\alpha|d\le||\alpha y+z||.$$
In other words, $|\lambda x|\le||x||$ for every $x$ in the domain of $\lambda$. This says precisely that $\lambda $ is bounded, in fact $||\lambda||\le1$. Hence $\lambda$ is continuous (and in particular HB says $\lambda$ extends to $\Lambda$ with $||\Lambda||\le 1$).
A: Let $P(x)=\inf_{z\in Z}\|x-z\|$. It is easy to show that $P(ax)=aP(x),a>0$ and $P(x+y)\leq P(x)+P(y)$. Meanwhile, $P(z)=0, \forall z\in Z$ and $P(y)=d$. We can show that $P(x)\leq \|x\|$ by choosing $z=0$ in the definition. 
Next, we define another function $L(x)$. $L(z)=0, \forall z\in Z$ and $L(y)=d$. Let $L$ be defined on the subspace $Y=\{by+z|z\in Z, b\in R\}$ and linear. It is easy to show that on $Y$, $L(x)\leq P(x)$. By the Hahn-Banah theorem, we can extend $L$ to the whole domain $X$ and $L(x)\leq P(x) \leq \|x\|, \forall x$. So, $\|L\|\leq 1$ and satisfy all other conditions. 
Done!
