in Friedberg book on linear algebra - 4th edition, Theorem 6.6 on page 350
Theorem 6.6: Let $W$ be a finite dimensional subspace of an inner product space $V$, and let $y\in V$. Then there exist unique vectors $u\in W$ and $z\in W^{\perp}$ such that $y=u+z$. Furthermore, if $\{v_1,v_2,...,v_k\}$ is an orthonormal basis for $W$, then
$$u=\sum_{i=1}^{k} \langle y,v_i\rangle v_i$$
Proof: Let $\{v_1,v_2,...,v_k\}$ be an orthonormal basis for $W$, let $u$ be as defined in the preceeding equarion, and let $z=y-u$. Clearly $u\in W$ and $y=u+z$.
To show that $z\in W^{\perp}$, it suffices to show that $z$ is orthogonal to each $v_j$. For any $j$, we have
$$\langle z,v_j\rangle =\langle \left( y-\sum_{i=1}^{k} \langle y,v_i\rangle v_i \right),v_j\rangle=\langle y,v_j\rangle - \sum_{i=1}^{k}\langle y,v_i\rangle\langle v_i,v_j\rangle=\langle y,v_j\rangle-\langle y,v_j\rangle=0$$
....
My question is: In the proof, he used the second part of the theorem ( which is a corollary for the first part) to prove the first part. How can it be a proof ?