sum of the squares of the distances from certain vertices of a cube to a certain plane I have encountered the following problem in a competition I particapated earlier this year.

Let $\omega$ be a plane in 3-space which passes through a vertex $A$ of a unit cube. For the vertices $B_1$, $B_2$, $B_3$ of the cube which are adjacent to $A$, let $F_1$, $F_2$, $F_3$ in turn be the feet of the perpendiculars dropped to $\omega$. Determine the value of $$(AF_1)^2+(AF_2)^2+(AF_3)^3.
$$

I believe the answer is 2, and it would be better to prove that $(B_1F_1)^2+(B_2F_2)^2+(B_3F_3)^2 = 1.$
I have tried several methods to prove this, first I tried to argue geometrically since in dimension 2 you have $2$ congruent triangles and the problem is very easy. But it turns out I juest don't know enough about the geometry of this to proceed.
I have also tried to just establish a coordinate system where $A = (0,0,0)$, then $\overrightarrow{AB_1},\overrightarrow{AB_2},\overrightarrow{AB_3}$ are $3$ unit, perpendicular vectors, and proving the square of their z-axis sum up to $1$ is what we need. In this case, I end up with a system of equations that is hard to work with.
 A: A sketch of a nice linear algebraic solution:
Let $ (q_1, q_2, q_3) $ be an orthonormal basis of $ \mathbb R^3 $ and $ Q = (q_1 \mid q_2 \mid q_3) \in \mathbb R^{3 \times 3} $. Let $ P \in \mathbb R^{3 \times 3} $ be a matrix representing an orthogonal projection onto a plane. What we want to calculate is $ \sum_{i=1}^3 \lVert Pq_i \rVert^2 $. Since $ Q $ is orthogonal and
$$
P = 
V
\begin{pmatrix}
1 & 0 & 0 \\
0 & 1 & 0 \\
0 & 0 & 0
\end{pmatrix}
V^T
$$
for some orthogonal $ V \in \mathbb R^{3 \times 3} $, we have
$$
\sum_{i=1}^3 \lVert Pq_i \rVert^2 =
\text{tr}((PQ)^T(PQ)) =
\text{tr}(Q^T P^T P Q)) =
\text{tr}(P^T P Q Q^T) =
\text{tr}(P^T P) = 
\text{tr} \left(
V
\begin{pmatrix}
1 & 0 & 0 \\
0 & 1 & 0 \\
0 & 0 & 0
\end{pmatrix}
V^T \right) =
\text{tr} \left(
\begin{pmatrix}
1 & 0 & 0 \\
0 & 1 & 0 \\
0 & 0 & 0
\end{pmatrix}
\right) = 2
$$
by the cyclic property of trace. This can easily be generalised to higher dimensions.
A: The answer is indeed $2$.
Let $$e_k:=\vec{AB_k}, \ \ \text{for} \ \ k=1,2,3$$
Let $N$ be a unit vector normal to plane $\omega$ with the following decomposition:
$$N=a_1e_1+a_2e_2+a_3e_3\tag{0}$$
onto orthonormal basis $e_1,e_2,e_3$.
Let $P_k$ be the projection of $B_k$ onto axis $\mathbb{R}N$.
In this way, we have 3 rectangles $AF_kB_KP_k$ all perpendicular to plane $\omega$.
Due to the fact that $e_1,e_2,e_3$ is an orthonormal basis, we have:
$$N.e_k=(a_1e_1+a_2e_2+a_3e_3).e_k= a_k = AP_k = F_kB_k  \tag{1}$$
(where $N.e_k$ is a dot product ; recall: the dot product with a unit vector is the algebraic length of its  projection, here onto the axis defined by vector $N$).
Besides, $N$ being defined as a unit vector, relationship (0) implies
$$(a_1)^2+(a_2)^2+(a_3)^2=1\tag{2}$$
If we apply now Pythagorean theorem to the three right triangles $AF_kB_k$, we get:
$$\begin{cases}(AF_1)^2+(F_1B_1)^2&=&(AB_1)^2\\
(AF_2)^2+(F_2B_2)^2&=&(AB_2)^2\\
(AF_3)^2+(F_3B_3)^2&=&(AB_3)^2\end{cases}\tag{3}$$
(3) can be transformed into
$$\begin{cases}(AF_1)^2+(a_1)^2&=&1\\
(AF_2)^2+(a_2)^2&=&1\\
(AF_3)^2+(a_3)^2&=&1\end{cases}.$$
Adding the 3 equations, and taking into account (2), we get the result :
$$AF_1^2+AF_2^2+AF_3^2+1=3 \ \ \iff \ \ AF_1^2+AF_2^2+AF_3^2=2$$
A: I would like to  solve the problem by using the following formula:
In $\Bbb R^3$, the distance from a point  $(x_0,y_0,z_0)$ to a plane $\alpha x+\beta y+\gamma z+\delta=0$ is $$\frac{|\alpha x_0+\beta y_0+\gamma z_0+\delta|}{\sqrt {\alpha^2+\beta^2+\gamma^2}}\tag{1}\label{eq1}$$
In this problem, we may let $A=(0,0,0)$  and the
three adjacent points be $B_1(1,0,0), B_2(0,1,0)$  and $B_3(0,0,1)$ respectively.
Since the plane passes through $A=(0,0,0)$, the equation of the plane has the form $\alpha x+\beta y+\gamma z=0$
Using $(1)$,
$$B_1F_1=\frac{|\alpha| }{\sqrt {\alpha^2+\beta^2+\gamma^2}}$$
$$B_1F_1^2=\frac{\alpha^2 }{\alpha^2+\beta^2+\gamma^2}$$
Since $AF_1^2=AB_1^2-B_1F_1^2$  (Pythagoras Theorem) and $AB_1=1$
We have
$$AF_1^2=1-\frac{\alpha^2 }{\alpha^2+\beta^2+\gamma^2}\tag{2}\label{eq2}$$
Similarly, we have
$$AF_2^2=1-\frac{\beta^2 }{\alpha^2+\beta^2+\gamma^2}\tag{3}\label{eq3}$$
$$AF_3^2=1-\frac{\gamma^2 }{\alpha^2+\beta^2+\gamma^2}\tag{4}\label{eq4}$$
$(2)+(3)+(4) \implies$
$$AF_1^2+AF_2^2+AF_3^2=3-\frac{\alpha^2+\beta^2+\gamma^2}{\alpha^2+\beta^2+\gamma^2}=2$$
