HINT 1:
Recall that if $\vec{x} = x_a \hat{e}_a + x_b \hat{e}_b + x_c \hat{e}_c$ and $\vec{y} = y_a \hat{e}_a + y_b \hat{e}_b + y_c \hat{e}_c$, then $\vec{x} \cdot \vec{y} = x_a y_a + x_b y_b + x_c y_c = \Vert x \Vert_2 \Vert y \Vert_2 \cos(\theta_{xy})$ where $\theta_{xy}$ is the angle between the vectors $\vec{x}$ and $\vec{y}$.
HINT 2:
Look at the norm of the vector, which make angles $a,b,c$ with the three axes.
Move the cursor over the gray area for a complete answer.
Let the vector be $\vec{x} = x_a \hat{e}_a + x_b \hat{e}_b + x_c \hat{e}_c$. Note that $x_a = \vec{x} \cdot \hat{e}_a = \Vert x \Vert_2 \cos(a)$ $x_b = \vec{x} \cdot \hat{e}_b = \Vert x \Vert_2 \cos(b)$ $x_c = \vec{x} \cdot \hat{e}_c = \Vert x \Vert_2 \cos(c)$ Further, $\Vert x \Vert_2^2 = \vert x_a \vert^2 + \vert x_b \vert^2 + \vert x_c \vert^2.$ Hence, $\Vert x \Vert_2^2 = \Vert x \Vert_2^2 \cos^2(a) + \Vert x \Vert_2^2 \cos^2(b) + \Vert x \Vert_2^2 \cos^2(c)$ Canceling off $\Vert x \Vert_2^2$, we get $\cos^2(a) + \cos^2(b) + \cos^2(c) = 1$