# An exercise with finite subspace of a Banach Space

I've been struggling with this exercise and i couldnt find any valid argument :

Let $X$ a Banach Space and $Y$ a closed subspace of $X$. If $Y$ has finite dimension then Y is a complemented subspace of $X$.

Am giving all the necessary definitions :

According to my book :

A subspace $Y$ of a Banach space $X$ is called complemented subspace if there exist a linear bounded operator $p:X \mapsto Y$ such that $p(x)=x$ for all $x \in Y$.

I have shown in a previous exercise that this is equivalent to :

There exist a closed subspace $Z$ of $X$ such that $Y \cap Z = \{0\}$ and $X = Y \oplus Z$, meaning that for all $x \in X$ there are unique $y \in Y$ and $z \in Z$ such that $x = y +z .$

Let $\{y_1,\cdots, y_n\}$ be a basis of $Y$. Now define $f_i:Y\to \mathbb{R}$ as $$f_i(r_1y_1+\cdots + r_ny_n) = r_i.$$ It is bounded linear operator over $Y$. Hence by Hahn-Banach theorem we can extend $f_i$ to the whole space. Now take $p(x) = f_1(x)y_1+\cdots f_n(x)y_n$.