Math Help - Maximal ideals in Banach algebras

1. Maximal ideals in Banach algebras

Hi!
I've a little problem with understanding proof of the following theorem:

In the red frames are this steps with which I've problems. In the first one I don't know from where we know that X is a zero set. In the second frame - how can I explain this in the simplest way.
Maybe there are simple questions but I'm rather algebraist and I always have problems with functionala analysis
I'll be grateful for any help.
Best regards

2. For the first question, if X has codimension 1, it means that you can fix an element $z\notin X$ and then any element y in A can be uniquely expressed in the form $y = x + \lambda z$, where $x\in X$ and $\lambda$ is a scalar. Define $f(y) = \lambda$. Then f is a linear functional whose zero set is X.

For the second question, if $y=x-f(x)e$ then $f(y) = f(x) -f(x)=0$ (since f(e)=1). Thus y is in the zero set of f, which by hypothesis consists of non-invertible elements. But if an element is non-invertible then 0 is in its spectrum.