<s>[INST] Equations of the two lines through the origin which intersect the line $\frac{x-3}{2}=\frac{y-3}{1}=\frac{z}{1}$ at an angle of $\frac{\pi}{3}$ Find the equations of the two lines through the origin which intersect the line $\frac{x-3}{2}=\frac{y-3}{1}=\frac{z}{1}$ at an angle of $\frac{\pi}{3}$.

Let the direction ratios of the two required lines be $(a_1,b_1,c_1)$ and $(a_2,b_2,c_2)$.
Therefore the two equations are 
$\frac{x-0}{a_1}=\frac{y-0}{b_1}=\frac{z-0}{c_1}$ and $\frac{x-0}{a_2}=\frac{y-0}{b_2}=\frac{z-0}{c_2}$
As these lines are making an angle of $\frac{\pi}{3}$ with $\frac{x-3}{2}=\frac{y-3}{1}=\frac{z}{1}$.
So,$\cos\frac{\pi}{3}=\frac{2a_1+b_1+c_1}{\sqrt6\sqrt{a_1^2+b_1^2+c_1^2}}$
And $\cos\frac{\pi}{3}=\frac{2a_2+b_2+c_2}{\sqrt6\sqrt{a_2^2+b_2^2+c_2^2}}$
But i am stuck here.How i can solve three variables with one equation.The book gives answer as $\frac{x}{1}=\frac{y}{2}=\frac{z}{-1}$ and $\frac{x}{-1}=\frac{y}{1}=\frac{z}{-2}$
Please help me. 
 [/INST] Hint: 
Write the equation of the line in parametric form, so that an arbitrary point is expressed in terms of just one letter. Then you can use the dot product to form a quadratic equation in the parameter giving you two solutions.
So we have$$\frac{x-3}{2}=\frac{y-3}{1}=\frac z1=\lambda$$
$$\Rightarrow \underline{r}=\left(\begin{matrix}x\\y\\z\end{matrix}\right)=\left(\begin{matrix}2\lambda+3\\ \lambda+3\\ \lambda\end{matrix}\right)$$
</s>