There are two theorems:
Theorem 1: Let $X$ be an inner product space and $M \neq \emptyset$ a complete convex subset. Then for all $x \in X$, there exists a unique $y \in M$ so that $$\delta = \inf_{z \in M} \|x-z\|=\|x-y\|.$$
Theorem 2: Let $X$ be as before, fix some $x \in X$, and suppose that $M$ is in fact a complete subspace $Y$. Then $z:=x-y$ is orthogonal to $Y$ if $y$ is the closest point to $x$.
References can be found in chapter 3 of Kreyzwig's book.
From here, you need only show that the set of solutions to $\lambda x-Ax=y$ is indeed closed and convex. It is convex since $(\lambda-A)x=y$ is affine. You should check that it is in fact closed (this follows from continuity) and a subspace.
On the other hand, fix $0 \in X$ and let $M=\{x \in X \mid (\lambda-A)x=y\}$. Then there exists some vector $y \in M$, that minimizes this distance, and is unique. In particular, $\inf_{z \in M} \|z-0\|=\inf_{z \in M}\|z\|=\|y\|$.
It's not so hard to see that this vector $y$ is the projection of $0$ onto $M$.