I have two line in 3d space with their intersection point, and angle between the two lines, how to find the equation of the set of unknown line.
Let the intersection point be $(x_1,y_1,z_1)$ and angle between them is $\theta$. and the given line be $r = (x_1,y_1,z_1) + k(a_1,b_1,c_1)$, where $a_1,b_1,c_1$ are direction ratios of the given line.
We can think of it as actually the set of unknown lines defines a conical surface where the known line is the axis of the cone and intersection point is the tip (vertex) of the cone.
Refer to the Wiki page on conical surface
Suppose the main axis of the cone is described by the unit vector $\textbf{d} = (a_1,b_1,c_1) $, then an implicit formula for the surface is given by
$$ (\textbf{d}\cdot\textbf{r})^2 - (\textbf{d}\cdot\textbf{d})(\textbf{r}\cdot\textbf{r})\cos^2\theta = 0 $$
where $\textbf{r} = (x-x_1,y-y_1,z-z_1)$ is the coordinate vector from the apex
The same formula in $x,y,z$ is $$ \big[a_1(x-x_1) + b_1(y-y_1) + c_1(z-z_1)\big]^2 \\ - \cos^2\theta({a_1}^2+{b_1}^2+{c_1}^2)\big[(x-x_1)^2+(y-y_1)^2+(z-z_1)^2\big] = 0 $$