My textbook says that
Given $$\vec{u}=\langle a_1,a_2,a_3\rangle,\space \vec{v}=\langle b_1,b_2,b_3\rangle$$ We need to find vector $\vec{w}=\langle x,y,z\rangle$ that is perpendicular to both vectors $\vec{u}$ and $\vec{v}$. Then $\vec{u}\cdot\vec{w}=0$ and $\vec{v}\cdot\vec{w}=0$. Then we have the following simultaneous equations. $$\begin{cases}a_1x+a_2y+a_3z=0\\b_1x+b_2y+b_3z=0\end{cases}$$ Then by solving we can reach the final solution $$\vec{w}=\langle a_2b_3-a_3b_2,a_3b_1-a_1b_3,a_1b_2-a_2b_1\rangle$$
Now, I wonder how did he reach the final result with just two simultaneous equations involving 3 variables
The system of equations has infinitely many solutions as one should expect, since the orthogonal space $<\vec{u},\vec{v}>^{\perp}$ is one dimensional, the cross product is the unique vector in this orthogonal complement that has as norm $||\vec{u}||||\vec{v}||\sin(\angle(\vec{u},\vec{v}))$ which is the area of the parallelogram spanned by these two vectors and that fullfills the right hand rule. This makes sense for example when desribing a torque:https://en.wikipedia.org/wiki/Torque