Hahn-Banach theorem setting, $L_{0}$ is the operator defined on the subspace $Y$, $L$ is the H-B extension to the whole space.
Proposition 3.5.5. If $Y$ is dense in $X$, then $L_{0}$ has a unique extension L (constructed by continuity). Proof. Let x $\in X \setminus Y$ . Then $\exists \{y_{n}\} \subset Y$ such that $y_{n} \rightarrow x$ in $Y$ (density). Taking $M=1$ we have $|L_{0}y_{n}-L_{0}y_{m}|\leq\|y_{n}-y_{m}\|$. But $y_{n}$ converges, so it is a Cauchy sequence, so also {$L_{0}y_{n}$} is a Cauchy sequence and $\exists$$\beta\in \mathbb{R}$ such that $L_{0}y_{n}\rightarrow\beta$ ( because $\mathbb{R}$ is complete). Define $Lx=\beta$, we have that $|L_{0}y_{n}|\leq M\|y_{n}\|$ $\implies$ $|Lx| \leq \lim_{n\rightarrow\infty} M\|y_{n}\| = M\|x\|$. So $L\in X^{*}$ and $L|_{Y}=L_{0} $ $\forall x \in X$ . The uniqueness of L comes from the uniqueness of the limit.
Ok so this is the proof my professor did at lesson for this proposition. It's clear to me, the only thing that I don't really like is that $L$ is a limit of $L_{0}$, so I can't see how by restricting $L$ on the subspace $Y$ I can go back to $L_{0}$.
$L$ is not a limit: $Lx$ is the name given to the limit of $\lim_{n\rightarrow \infty} L_0 y_n$ but that doesn't mean $\lim_{n\rightarrow \infty}L_0 = L$ (writing it out like that should make it clear that with no dependence on $n$ there can be no limit operation). Since you can find a sequence $\{y_n \} \rightarrow y$ for each $y\in Y$ you are defining $L$ for all points of $Y$ and then for all points of $X$ by the limiting process. In fact, $L=L_0$ for all $y\in Y$ by construction, and you're showing after that that what you've built is actually a linear functional.