Finding the projection matrix of $\mathbb R^3$ onto the plane $x-y-z=0$ 
Find the matrix of the projection of $\mathbb{R}^3$ onto the plane $x-y-z = 0.$

I can find a normal unit vector of the plane, which is $\vec{n}=(\frac{1}{\sqrt{3}},-\frac{1}{\sqrt{3}},-\frac{1}{\sqrt{3}})^T$
And then the vectors $\vec{u}=(1,1,0)^T, \ \vec{v} = (1,0,1)^T$ form a basis of $\mathbb{R}^3$. but why would the solution be $$A = \begin{pmatrix} 0 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{pmatrix}?$$
 A: One normal vector to the plane is ${\bf n} = (1,-1,-1)$. I want to take a point $(x,y,z) \in \Bbb R^3$, consider the line through this point with direction $\bf n$, and see where it hits the plane. We have the line: $${\bf X}(t) = (x+t,y-t,z-t), \quad t \in \Bbb R.$$
I want $t_0$ such that ${\bf X}(t_0)$ satisfies the plane equation. So the relation we have is: $$x+t_0 - (y-t_0) - (z-t_0)=0 \implies x-y-z+3t_0 = 0 \implies t_0 = \frac{-x+y+z}{3}.$$
With this, $P(x,y,z) = \left(x+\frac{-x+y+z}{3}, y - \frac{-x+y+z}{3}, z - \frac{-x+y+z}{3}\right)$. We have $$\begin{align}P(1,0,0) &= (2/3, 1/3, 1/3) \\ P(0,1,0) &= (1/3, 2/3, -1/3) \\ P(0,0,1) &= (1/3,-1/3, 2/3)\end{align},$$ so the matrix would be: $$A = \frac{1}{3}\begin{pmatrix} 2 & 1 & 1 \\ 1 & 2 & -1 \\ 1 & -1 & 2\end{pmatrix}.$$
A: In general you can write the projection matrix very easily using an arbitrary basis for your subspace. Look at this.
So for your case, first finding a basis for your plane:
$$x-y-z=0\Longrightarrow x=y+z$$
$$\{\begin{bmatrix}
1\\ 1\\ 0\end{bmatrix},\begin{bmatrix}
1\\ 0\\ 1\end{bmatrix}\}$$
Now let $A:=\begin{bmatrix}
1 & 1\\
1 & 0\\
0 & 1\end{bmatrix}$, your projection matrix is $A(A^tA)^{-1}A^t$. Computing it by hand is not hard but I prefer to put the Maple computation for you here:
A := Matrix([[1, 1], [1, 0], [0, 1]]);
P := A.MatrixInverse(Transpose(A).A).Transpose(A);

The result is:
$$\begin{bmatrix}
\frac{2}{3} & \frac{1}{3} & \frac{1}{3}\\
\frac{1}{3} & \frac{2}{3} & -\frac{1}{3}\\
\frac{1}{3} & -\frac{1}{3} & \frac{2}{3}\end{bmatrix}$$
Now the matrix you showed at the end of your question. If you extend an arbitrary basis of $W$ which of course it has 2 elements, to a basis for $\mathbb{R}^3$ and then indexing these three vectors in the way that the new added vector be the first then representation of $P$ in this new ordered basis is $\begin{bmatrix}0 & 0 & 0\\ 0 & 1 & 0\\ 0 & 0 & 1\end{bmatrix}$ because say $B:=\{v_1,v_2,v_3\}$ be this ordered basis then basis of $W$ is $\{v_2,v_3\}$, in the new coordinate:
$$v_2=0v_1+1v_2+0v_3\longrightarrow v_2=\begin{bmatrix}0\\ 1\\ 0\end{bmatrix}$$
$$v_2=0v_1+0v_2+1v_3\longrightarrow v_2=\begin{bmatrix}0\\ 0\\ 1\end{bmatrix}$$
Now letting $A:=\begin{bmatrix}
0 & 0\\
1 & 0\\
0 & 1\end{bmatrix}$ We have:
A := Matrix([[0, 0], [1, 0], [0, 1]]);
P := A.MatrixInverse(Transpose(A).A).Transpose(A);

The result is:
$$\begin{bmatrix}
0 & 0 & 0\\
0 & 1 & 0\\
0 & 0 & 1\end{bmatrix}$$
But pay attention this representation of $P$ is not in the standard coordinate, it is in the new coordinate system given by the ordered basis $B$.
A: Assuming you are searching an orthogonal projection the other answers  are good. But the text of your problem request a generic projection on a plane where $x=y+z$, so a solution is the matrix:
$$
\left [
\begin{array}{cccc}
0&1&1\\
0&1&0\\
0&0&1
\end {array}
\right ]
$$
Your matrix $A$ is a projection on the plane $x=0$.
A: Assuming you mean the orthogonal projection onto the plane $W$ given by the equation $x-y-z$, it is equal to the identity minus the orthogonal projection onto $W^\perp$, which is sightly easier to compute. Now $W^\perp$ is the span of the normal vector $v=(1,-1,-1)$, and the orthogonal projection onto which is $x\mapsto \frac{(v\mid x)}{(v\mid v)}v$, and whose matrix is
$$
\frac13\begin{pmatrix}1\\-1\\-1\end{pmatrix}
\begin{pmatrix}1&-1&-1\end{pmatrix}
=\frac13\begin{pmatrix}1&-1&-1\\-1&1&1\\-1&1&1\end{pmatrix}.
$$
Subtracting this from the identity gives
$$
\begin{pmatrix}2/3&1/3&1/3\\1/3&2/3&-1/3\\1/3&-1/3&2/3\end{pmatrix}.
$$
