In 'Functional Analysis'by Rudin, Lemma $4.21$
Let $M$ be a closed subspace of a topological vector space $X$.
(a) If $X$ is locally convex and $dim(M) < \infty$, then $M$ is complemented in $X$.
(b) If $dim(X/M) < \infty$, then $M$ is complemented in $X$.
(The following proof is copied from the book)
Proof: (a) Let $\{ e_1,...,e_n \}$ be a basis for $M$. Every $x \in M$ has then a unique representation $$x = \alpha_1(x)e_1 + ...+ \alpha_n(x)e_n.$$
Each $\alpha_i$ is continuous linear functional on $M$ which extends to a member of $X^*$, by the Hahn-Banach Theorem. Let $N$ be the intersection of the null spaces of these extensions. Then $X = M \oplus N$.
(b) Let $\pi: X \rightarrow X / M$ be the quotient map, let $\{ e_1,...,e_n \}$ be a basis for $X/M$, pick $x_i \in X$ so that $\pi(x_i)=e_i$ for $1 \leq i \leq n$, and let $N$ be the vector space spanned by $\{ x_1,...,x_n \}$. Then $X=M \oplus N$.
Question:
(1) How to show that $X \subseteq M + N$ for both cases?
(2) How to show that $M \cap N = \{ 0 \}$ for (b)?
(3) Why we need $X$ to be locally convex for (a)?