The following is an exercise in the functional analysis book. I could not understand the idea of the solution given. So wondered if I can have an elaboration on the solution and what is a general practice.

$\textbf{solution:}$
Copyright © 2021 JogjaFile Inc.

A key point of the proof is that since $Y$ is a closed subspace (since it's finite dimensional) of the Hilbert space $H$, there is an orthogonal projection $\pi_Y: H \rightarrow Y$. If you are unfamiliar with this you should consult literature for the various equivalent definitions/properties of orthogonal projections. One of its properties is that for $x\in H$, $\pi_Y(x)$ is the element in $Y$ that lies closest to $x$. Hence $||x-\pi_Y(x)||=d(x, Y)$. This is why $\sup\limits_{||x||\leq 1}||K(x)-\pi_YK(x)||\leq \sup\limits_{||x||\leq 1}d(K(x), Y)$ which is used in the proof. In fact this is an equality.