You can easily check for A considering the product by the basis vector of the plane, since $\forall v$ in the plane must be:
$$Av=v$$
Whereas for the normal vector:
$$An=0$$
Note that with respect to the basis $\mathcal{B}:{c_1,c_2,n}$ the projection matrix is simply:
$$P_{\mathcal{B}}=\begin{bmatrix}
1 & 0 & 0\\
0 & 1 & 0\\
0 & 0 & 0\end{bmatrix}$$
If you need the projection matrix with respect to another basis you simply have to apply a change of basis to obtain the new matrix.
For example with respect to the canonical basis, lets consider the matrix M which have vectors of the basis $\mathcal{B}:{c_1,c_2,n}$ as colums:
$$M=\begin{bmatrix}
-1 & 0 & 1\\
0 & -1 & 1\\
1 & 1 & 1\end{bmatrix}$$
If w is a vector in the basis $\mathcal{B}$ its expression in the canonical basis is $v$ give by:
$$v=Mw\implies w=M^{-1}v$$
Thus if the projection $w_p$ of w in the basis $\mathcal{B}$ is given by:
$$w_p=P_{\mathcal{B}}w$$
The projection in the canonical basis is given by:
$$M^{-1}v_p=P_{\mathcal{B}}M^{-1}v\implies v_p=MP_{\mathcal{B}}M^{-1}v $$
Thus the matrix:
$$A=MP_{\mathcal{B}}M^{-1}=$$
$$=\begin{bmatrix}
-1 & 0 & 1\\
0 & -1 & 1\\
1 & 1 & 1\end{bmatrix}\begin{bmatrix}
1 & 0 & 0\\
0 & 1 & 0\\
0 & 0 & 0\end{bmatrix}\begin{bmatrix}
-1 & \frac13 & \frac13\\
\frac13 & -1 & \frac13\\
\frac13 & \frac13 & \frac13\end{bmatrix}=\begin{bmatrix}
2/3 & -1/3 & -1/3\\
-1/3 & 2/3 & -1/3\\
-1/3 & -1/3 & 2/3\end{bmatrix}$$
represent the projection matrix in the plane with respect to the canonical basis.
Suppose now we want find the projection matrix from the base $\mathcal{B}$ to the canonical $\mathcal{C}$.
Let's consider the projection $w_p$ of w in the basis $\mathcal{B}$ is given by:
$$w_p=P_{\mathcal{B}}w$$
thus:
$$M^{-1}v_p=P_{\mathcal{B}}w\implies v_p=MP_{\mathcal{B}}w$$
Thus the matrix:
$$C=MP_{\mathcal{B}}=$$
$$=\begin{bmatrix}
-1 & 0 & 1\\
0 & -1 & 1\\
1 & 1 & 1\end{bmatrix}\begin{bmatrix}
1 & 0 & 0\\
0 & 1 & 0\\
0 & 0 & 0\end{bmatrix}=\begin{bmatrix}
-1 & 0 & 0\\
0 & -1 & 0\\
1 & 1 & 0\end{bmatrix}$$
represent the projection matrix from the base $\mathcal{B}$ to the canonical $\mathcal{C}$.
In $\mathbb R^n$ in any number of dimensions, with the usual distance function, if you have a line through the origin in the direction of a vector $\mathbf r,$ as you have in your first figure,
and any other vector $\mathbf v,$ the length of the projected vector you get by projecting
$\mathbf v$ onto the line of $\mathbf r$ is just the inner product (aka dot product)
$$ v_r = \left(\frac1{\lVert\mathbf r\rVert}\mathbf r\right) \cdot v. $$
In general, the vector $\frac1{\lVert\mathbf r\rVert}\mathbf r$ is simply a unit vector in the same direction as $\mathbf r.$
In two dimensions, with a vector $\mathbf r$ at an angle $\theta$ from the $x$ axis, it happens that the vector on the left side of that inner product is
$$ \frac1{\lVert\mathbf r\rVert} \mathbf r=
\begin{bmatrix}
\cos\theta \\
\sin\theta
\end{bmatrix},$$
and therefore the inner product is given by the matrix multiplication you showed.
In your three-dimensional case, you can set
$$\frac1{\lVert\mathbf r\rVert} \mathbf r=
\begin{bmatrix} f_1(\theta, \phi) \\
f_2(\theta, \phi) \\
f_3(\theta, \phi) \end{bmatrix},$$
that is, simply set $f_1(\theta, \phi),$ $f_2(\theta, \phi),$ and
$f_3(\theta, \phi)$ to the three coordinates of the unit vector in the direction $\theta,\phi.$ You can read these coordinates off your diagram.
(They are combinations of trigonometric functions of $\theta$ and $\phi$ which you've already written; just don't multiply by $R$.)
Best Answer
I'll try to do it without getting away too much from your point of view.
You have a plane $T : x + 2y - 3z + 3 = 0$, which I can rewrite as $$ \begin{bmatrix} 1 \\ 2 \\ -3 \end{bmatrix} \begin{bmatrix} x & y & z \end{bmatrix} = -3. $$ Now you are projecting in the direction $\begin{bmatrix} 1 & 1 & -1 \end{bmatrix}$, so you want to find $\alpha$ such that for arbitrary $x,y,z$ real, we have that $$ \begin{bmatrix} 1 \\ 2 \\ -3 \end{bmatrix} \left( \begin{bmatrix} x & y & z \end{bmatrix} + \alpha \begin{bmatrix} 1 & 1 & -1 \end{bmatrix} \right) = \begin{bmatrix} 1 \\ 2 \\ -3 \end{bmatrix} \begin{bmatrix} x + \alpha & y + \alpha & z - \alpha \end{bmatrix} = -3. $$ But the last equation can be re-written as $$ (x+\alpha) + 2(y + \alpha) -3(z - \alpha) = x + 2y - 3z + 6\alpha = -3. $$ Therefore, $$ \alpha = \frac{x+2y-3z+3}6 $$ gives you the unique $\alpha$ for which this is possible. If you actually need to compute the algorithm (matrix) which finds the projection as a function of $x$,$y$ and $z$, just compute the vector $[x+\alpha, y+\alpha,z-\alpha]$ and see the matrix there. This would give $$ \begin{bmatrix} x + \alpha & y + \alpha & z - \alpha \end{bmatrix} = \begin{bmatrix} \frac{7x + 2y - 3z + 3}6 & \frac{x+8y-3z+3}6 & \frac{-x-2y+3z-3}6 \end{bmatrix} $$ or, written in column form (as standard) $$ \begin{bmatrix} x + \alpha \\ y + \alpha \\ z - \alpha \end{bmatrix} = \begin{bmatrix} \frac{7x + 2y - 3z + 3}6 \\ \frac{x+8y-3z+3}6 \\ \frac{-x-2y+3z-3}6 \end{bmatrix} = \begin{bmatrix}\frac 76 & \frac 26 & \frac {-3}6 \\ \frac 16 & \frac 86 & \frac {-3}6 \\ \frac {-1}6 & \frac{-2}6 & \frac 36 \end{bmatrix} \begin{bmatrix} x \\ \\ \\ y \\ \\ \\ z \end{bmatrix} + \begin{bmatrix} \frac 36 \\ \frac 36 \\ \frac{-3}6 \end{bmatrix} = P \left( \begin{bmatrix} x \\ \\ \\ y \\ \\ \\ z \end{bmatrix} \right). $$ where $P$ would be the "projection map".
Hope that helps,