Kristi, first of all if you are projecting $\begin{bmatrix}
x_1\\
x_2\\
x_3
\end{bmatrix}$ onto the $x_{1}=x_{2}$ plane, then you are projecting onto the plane $x=y$, not $y=z$ (since you defined $x=x_{1}$, $y=x_{2}$, and $z=x_{3}$).
Now, as you are trying to find the coordinates of the projection vector, imagine the geometric meaning -- $z$, the 'height' of the vector will not ever change, as it is not relevant to the equation, but $x$ and $y$ will, depending on where the vector lies. When we are trying to find a projection on an n-dimensional subspace $W$, we can use a formula of ${proj_{W}}{\vec{x}}$=$(\vec{u_1}\cdot \vec{x})$$\vec{u_1}$+$(\vec{u_2}\cdot \vec{x})$$\vec{u_2}$$+\cdots +$$(\vec{u_n}\cdot \vec{x})$$\vec{u_n}$, where $\vec{u_1}, \vec{u_2}\dots \vec{u_n}$ form an orthonormal basis of the subspace $W$. Here, $W$ is defined as $x=y$, meaning it can be spanned by vectors $\vec{v_1}$ = $
\begin{bmatrix}
1\\
1\\
0
\end{bmatrix}$ and $\vec{v_2}$ =
$
\begin{bmatrix}
1\\
1\\
2
\end{bmatrix}$, for example. To find an orthonormal basis of our space (meaning that all vectors in it will be mutually orthogonal/perpendicular, as well as of a length one), let's use the Gram-Schmidt process. An orthonormalized version of the vector $
\begin{bmatrix}
1\\
1\\
0
\end{bmatrix}$ would be $\vec{u_1}$ = $\frac{1}{\sqrt{2}}$$
\begin{bmatrix}
1\\
1\\
0
\end{bmatrix}$, as that will make it of length one. Now, by Gram-Schmidt, $\vec{u_2}=\vec{v_2}-\frac{\vec{v_2}\cdot\vec{u_1}}{\vec{u_1}\cdot\vec{u_1}} \vec{u_1}$, since we are basically subtracting the $\vec{u_1}$ component from our second vector, in order to get a vector perpendicular to $\vec{u_1}$ as a result. Calculations result into the following: $\vec{u_2}$=
$\begin{bmatrix}
1\\
1\\
2
\end{bmatrix}$
$-$$\frac{\begin{bmatrix}
1\\
1\\
2
\end{bmatrix} \cdot \frac{1}{\sqrt{2}}
\begin{bmatrix}
1\\
1\\
0
\end{bmatrix}}{\frac{1}{\sqrt{2}}
\begin{bmatrix}
1\\
1\\
0
\end{bmatrix} \cdot \frac{1}{\sqrt{2}}
\begin{bmatrix}
1\\
1\\
0
\end{bmatrix}} \frac{1}{\sqrt{2}}
\begin{bmatrix}
1\\
1\\
0
\end{bmatrix}$ = $\begin{bmatrix}
1\\
1\\
2
\end{bmatrix}$ - $\begin{bmatrix}
1\\
1\\
0
\end{bmatrix}$=$\begin{bmatrix}
0\\
0\\
2
\end{bmatrix}$. Normalizing the resulting vector, we get $\vec{u_2}$ = $\begin{bmatrix}
0\\
0\\
1
\end{bmatrix}$.
Now that we have an orthogonal basis $\vec{u_1}$ = $\frac{1}{\sqrt{2}}$$\begin{bmatrix}
1\\
1\\
0
\end{bmatrix}$ and $\vec{u_2}$ = $\begin{bmatrix}
0\\
0\\
1
\end{bmatrix}$, we can calculate the projection.
So, to find the projection of your vector $\begin{bmatrix}
x_1\\\
x_2\\\
x_3
\end{bmatrix}$ we use our orthonormal basis and the projection formula: ${proj_{W}}\begin{bmatrix}
x_1\\
x_2\\
x_3
\end{bmatrix}$=($\frac{1}{\sqrt{2}}$$\begin{bmatrix}
1\\
1\\
0
\end{bmatrix} \cdot \begin{bmatrix}
x_1\\
x_2\\
x_3
\end{bmatrix})(\frac{1}{\sqrt{2}}$$\begin{bmatrix}
1\\
1\\
0
\end{bmatrix})$$+$$(\begin{bmatrix}
0\\
0\\
1
\end{bmatrix} \cdot \begin{bmatrix}
x_1\\
x_2\\
x_3
\end{bmatrix})(\begin{bmatrix}
0\\
0\\
1
\end{bmatrix})$. After arithmetic, this results into ${proj_{W}}\begin{bmatrix}
x_1\\
x_2\\
x_3
\end{bmatrix}$=$(\frac{x_1+x_2}{\sqrt{2}})$$(\frac{1}{\sqrt{2}}\begin{bmatrix}
1\\
1\\
0
\end{bmatrix})$+$\begin{bmatrix}
0\\
0\\
x_3
\end{bmatrix}$=$\begin{bmatrix}
\frac{x_1+x_2}{2}\\
\frac{x_1+x_2}{2}\\
x_3
\end{bmatrix}$.
So, now you have your coordinates.
To find out the eigenvalues, think of the nature of the transformation -- the projection will not do anything to a vector if it is within the plane onto which you are projecting, and it will crash it if the vector is perpendicular to the plane. So, your eigenvalues are 1 and 0. A basis of eigenspace of 1 $\xi_{1}$ will have two vectors, as the plane is spanned by two of them. You could choose them to be your original $v_1$ and $v_2$, which were $
\begin{bmatrix}
1\\
1\\
0
\end{bmatrix}$ and $\begin{bmatrix}
1\\
1\\
2
\end{bmatrix}$. To find a basis of eigenspace of 0 $\xi_{0}$, you need to find a vector perpendicular to this plane. You could use a property of cross-product, which states that $\vec{v_1} \times \vec{v_2}$ produces a vector $\vec{v_3}$ perpendicular to both. Crossing the aforementioned vectors, you get $\vec{v_3}=\begin{bmatrix}
2\\
-2\\
0
\end{bmatrix}$.
Now that you know all of this, finding the matrix B is very easy by inspection; consider $\begin{bmatrix}
\frac{1}{2} & \frac{1}{2} & 0 \\
\frac{1}{2} & \frac{1}{2} & 0 \\
0 & 0 & 1
\end{bmatrix}$.
the line through $(x_1, y_1, z_1)$ and orthogonal to the plane $ax + by + cz = d$ has the parametric representation $$x = x_1 - at, y = y_1 - bt, z = z_1 - ct$$ where $t$ is a real number. for this point to be on the plane $t$ needs to satisfy
$$t_1 = {ax_1+by_1 + cz_1 - d \over a^2 + b^2 + c^2}$$ and the shortest distance is $$\sqrt{a^2 + b^2 + c^2} |t_1| = {|\ ax_1+by_1 + cz_1 - d\ |\over \sqrt{a^2 + b^2 + c^2}} $$
Best Answer
First, vectors are considered a column vectors by default, so ${n_i}^T$ is a row vector. Then the denominator is the matrix product ${n_i}^Tn_i$, which is the same as the inner product $n_i\cdot n_i$, that is, it gives the square of the length of $n_i$: $${n_i}^Tn_i=\|n_i\|^2\,.$$ Now introduce $m_i:=n_i/\|n_i\|$, this is already a unit vector ($\|m_i\|=1$). We have $$m_i\,m_i^T=\frac{n_i\,{n_i}^T}{\|n_i\|^2}=P_i\,.$$ We also have $P^2=m_im_i^T\cdot m_im_i^T=m_i\,\|m_i\|^2\, m_i^T=m_i\cdot1\cdot m_i^T=P_i$, and ${P_i}^T=(m_im_i^T)^T=((m_i)^T)^Tm_i^T=m_im_i^T=P_i$, so $P_i$ is indeed an orthogonal projection matrix.
Say, $v$ is parallel to the plane $i$, so that $v\perp n_i$, or, $v\perp m_i$. Then we have $m_i^Tv= m_i\cdot v=0$, so also $P_iv=0$. On the other hand $P_i(m_i)=m_i$. So, $P_i$ projects orthogonally to the line of $m_i$.
If you want the projection to the plane, then you have to take $I-P_i$ where $I$ is the identity matrix.
For (1), by the avove, we get that $P_i(p-o_i)$ is the orthogonal projection of the vector $p-o_i$ (this one goes from point $o_i$ to point $p$) to the line of $m_i$, so its length is indeed the distance from $p$ to the plane.
Alternatively, we can calculate it as $$|(p-o_i)\cdot m_i|\,,$$ maybe it's a bit more simple..
Update: For a linear transformation $T:V\to V$ to be idempotent (i.e. $T^2=T$), is equivalent to that $T$ is a projection, but not necessarily orthogonal, i.e. there are subspaces $U,W$ such that $T$ is the projection onto $U$ along $W$. Here $U$ and $W$ are disjoint: $U\cap W=\{0\}$, and together span the whole $V$, i.e. every vector $v$ can be uniquely written in the form $v=u+w$ for $u\in U,\,w\in W$. [This fact is denoted by $V=U\oplus W$.]
Now, if $T^2=T$, then let $U:={\rm ran\,}T=\{Tv\mid v\in V\}$, and let $W:=\ker T=\{v\mid Tv=0\}$. Try to prove the statements above w.r.t $U$ and $W$, and that $$T(u+w)=u$$ for all $u\in U$ and $w\in W$.
The additional condition that $T^*=T$ ensures in addition that $W\perp U$, so it is an orthogonal projection.