I think they do something unnecessary in my notes in the proof of the following lemma:
The idea of the proof is to partially order the set $\Sigma$ of pairs $(X_i, f_i)$ where $X_i$ is a linear subspace of $X$ containing $Y$ and $f_i : X_i \to \mathbb R$ is a linear map. Then apply Zorn to get a maximal element $(X^\prime, f^\prime)$ and show that $X^\prime = X$. The way to do this is by contradiction. One assumes that there is a point $z$ in $X \setminus X^\prime$ and then defines a $g$ such that $(X^{\prime \prime}, g) $ where $X^{\prime \prime} $ is spanned by $z$ and $X^\prime$ is strictly greater than $(X^\prime, f^\prime)$ in $\Sigma$, contradicting maximality.
In the notes we define $g$ in terms of $f^\prime$: If $z \in X \setminus X^\prime$ and $y \in X^{\prime \prime}$ then $g(y) = f^\prime(x^\prime) + \lambda c$ for some $\lambda$ and some $x^\prime \in X^\prime$. All we need to show is $g \leq p$. And this is the part where I think they are doing something superfluous. They pick $c \in [A,B]$ (see below) where I think it's enough to pick $c \leq B$:
If those pngs aren't readable then you can also find the proof in these notes at the very start of chapter 6. Thanks for your help.