How can I calculate the dot product of two vectors if I know both dot products with a third vector?
In general, the answer is no.
$$a=(a_1,a_2,0)$$
$$b=(b_1,b_2,0)$$
$$c=(0,0,1)$$
So long as $a_1^2+a_2^2=1=b_1^2+b_2^2$, you will have $|a|=|b|=|c|=1$, and $a\cdot c=b\cdot c=0$. However you can make $a\cdot b$ be anything you want (between $-1$ and $1$).
You cannot.
Take $a,b$ be two unit vectors in $\operatorname{span}(e_1,e_2)$ ($(e_i)_{1\leq i\leq n}$ being the standard orthonormal basis), and $c=e_3$.
Then $\langle a,c\rangle = \langle b,c\rangle = 0$, and you know $\lvert a\rvert = \lvert b\rvert= \lvert c\rvert =1$ by assumption, but $\langle a,b\rangle$ could take any value in $[-1,1]$.