In Reed & Simon's text on functional analysis,, they state the Riesz lemma as
For each $T \in H^*$, there is a unique $y_T \in H$ such that $T(x) = (y_T, x)$ for all $x \in H$. In addition $\|Y_T\|_H = \|T\|_{H^*}$.
Their (paraphrased) proof is:
Let $N = \{x \in H : T(x) = 0\}$ and note that $N$ is closed (since it is the preimage of a closed set and $T$ is continuous). Assume $N \neq H$, so there is a nonzero vector $x_0 \in N^\perp$. Let $$Y_T = \overline{T(x_0)}\|x_0\|^{-2}x_0.$$ Then, if $\alpha x_0 = x \in N$, $T(x) = (y_T, \alpha x_0)$. Since the function $T(\cdot)$ and $(y_T, \cdot)$ are linear and agree on $N$ and $x_0$, they must agree on the space spanned by $N$ and $x_0$.
Now this is the part I do not understand:
But $N$ and $x_0$ span $H$ since every element $y \in H$ can be written $$y = \Big(y - \frac{T(y)}{T(x_0)}x_0\Big) + \frac{T(y)}{T(x_0)}x_0.$$ Thus $T(x) = (y_T, x)$ for all $x \in H$.
They then go on to prove uniqueness and equality of the two norms, but I understand those so I have omitted them.
How does $y$ being written in that form imply that $N$ and $x_0$ span $H$? I assume it somehow implies that $y - \frac{T(y)}{T(x_0)}x_0 \in N$, but I do not see how. Also, since we assumed $x \in N$, and $x = \alpha x_0$, by linearity, isn't $x_0$ also in $N$?
EDIT: $$T(x) = T(\alpha x_0) = \alpha T(x_0) = \overline{(T(x_0)}\|x_0\|^{-2}x_0, \alpha x_0) = (y_T, \alpha x_0)$$