I am confused about something related to Hahn-Banach. According to my book, one corollary of H-B is that for $$X$$ a real or complex normed space, there exists $$f \in X'$$ such that $$\|f\| = 1$$ and $$f(x) = \|x\|$$.

But, is $$f$$ then linear? Because for the norm we have $$f(\alpha x) = \|\alpha x\| = |\alpha|\|x\|$$, and $$f(x+y) = \|x+y\| \leq \|x\| + \|y\|$$, how can this give linearity? Since $$X' = B(X,\mathbb{F}) \subseteq L(X,\mathbb{F})$$, $$f$$ should be linear right?

It is not the case that $$f(x)=\|x\|$$ for every $$x\in X$$. The corollary goes like this: Given a particular $$x_0\in X$$, there exists $$f\in X'$$ such that $$\|f\|=1$$ and $$f(x_0)=\|x_0\|$$.
The equation $$f(x)=\|x\|$$ holds for a particular $$x$$, not for all $$x$$. $$f$$ itself depends on the given vector $$f$$.