Consider the snippet below from Andrew Ng's lecture notes on Support Vector Machines.

He goes on to state that $B = x^{(i)} - \gamma^{(i)} \frac{w}{\|w\|}$. I am having a hard time seeing why this is the case (calculus very very rusty). Can anyone describe the steps to arrive at this value?
Their $\gamma^{i}$ is the distance from the point $A$ to the plane. The closest point $B$ on the plane to $A$ is the orthogonal projection of $A$ onto the plane; orthogonal projection onto a plane and closest point projection are always the same, regardless of dimension. That is, $A-B$ must be in the direction of the normal $w$ to the plane. In this case, apparently the vector from $B$ to $A$ is in the same direction as $w$. Therefore, if the distance from $A$ to the plane is $\gamma^{i}$, then $$ A=B+\gamma^{i}\frac{1}{\|w\|}w $$ or $$ A-\gamma^{i}\frac{1}{\|w\|}w=B. $$