Confusion regarding the proof of the existence of a best approximation in functional analysis. The book "Introductory Functional Analysis with Applications" by Kreyszig says the following: 

Existence Theorem (Best approximation)- If $Y$ is a finite dimensional subspace of a normed space $X=(X,\|.\|$), then for each $x\in X$, there exists a best approximation to $x$ out of $Y$.

My argument:
Take any $x\in X$. If $x\in Y$, then $\inf\limits_{y\in Y}\|x-y\|=0$. If $x\in X-Y$, then $\inf\limits_{y\in Y}\|x-y\|=a$, where $a>0$. This implies that $\exists y_0\in Y$ such that $\|x-y_0\|=a$. Hence, $y_0$ is the closest approximation to $x$. 
This argument is much more trivial as compared to the one given in the book, and seems to work for infinite dimensional vector spaces. Where am I going wrong?
Thanks in advance!
EDIT: Is my mistake the fact that I assumed $\exists y_0\in Y$ such that $\|x-y_0\|=a$?

As Anthony Carapetis pointed out, your argument assumes what is to be proved: namely, that the infimum of distance is attained. 
A correct proof uses compactness. Take a minimizing sequence $y_n$, i.e., a sequence $y_n\in Y$ such that $\|x-y_n\|\to \inf_{y\in Y}\|x-y\|$. Since this is a bounded sequence in a finite dimensional space, there is a convergent subsequence $y_{n_k}\to y$. Since $\|x-y_n\|\to \|x-y\|$, this $y$ achieves the infimum. 
The argument breaks down for infinite-dimensional subspaces. So does the result (example).
