As you said, each line can be written, in parametric form, as
$$
\left( {\matrix{
x \cr
y \cr
x \cr
} } \right) = \left( {\matrix{
{a_x } \cr
{a_y } \cr
{a_z } \cr
} } \right) + \lambda \left( {\matrix{
{v_x } \cr
{v_y } \cr
{v_z } \cr
} } \right)
$$
So we can represent each group of three lines in matricial notation as
$$
{\bf X} = \left( {\matrix{
{x_{\,1} } & {x_{\,2} } & {x_{\,3} } \cr
{y_{\,1} } & {y_{\,2} } & {y_{\,3} } \cr
{z_{\,1} } & {z_{\,2} } & {z_{\,3} } \cr
} } \right) = {\bf A} + {\bf V}\;{\bf \Lambda }\quad \quad {\bf X}' = \left( {\matrix{
{x'_{\,1} } & {x'_{\,2} } & {x'_{\,3} } \cr
{y'_{\,1} } & {y'_{\,2} } & {y'_{\,3} } \cr
{z'_{\,1} } & {z'_{\,2} } & {z'_{\,3} } \cr
} } \right) = {\bf A}' + {\bf V}'\;{\bf \Lambda }'
$$
where is clear the meaning of the matrices , and in particular that the ${\bf \Lambda }$ and ${\bf \Lambda }'$ matrices are diagonal.
Now if each line of the first group was to intersect the corresponding line in the second group, that means
that there are specific values of $\lambda_k$ and ${\lambda '}_j$ such that ${\bf X} ={\bf X}' $, i.e.
$$
{\bf A} + {\bf V}\;{\bf \Lambda } = {\bf A}' + {\bf V}'\;{\bf \Lambda }'
$$
or
$$
\;{\bf \Lambda } = {\bf V}^{\, - \,{\bf 1}} \left( {{\bf A}' - {\bf A}} \right) + {\bf V}^{\, - \,{\bf 1}} {\bf V}'\;{\bf \Lambda }' = diag
$$
That translates into a linear system of six equations in the three unknowns $\lambda'$, which then determine the $\lambda$.
If instead each line of the first group was to intercept one line of the 2nd group, different but not necessarily the corresponding one,
then we shall have ${\bf X} \, {\bf P} ={\bf X}' $, or v.v, where ${\bf P}$ is one of the $6$ Permutation matrices.
Also, if each line of the first group was to intercept one line of the 2nd group, not necessarily distinct,
then we shall have ${\bf X} ={\bf X}' \, {\bf Q} $, where ${\bf Q}$ is one of the $9$ "$0/1$" matrices, having only one $1$ in each column.
Finally, as per your question, we can introduce a Rotation matrix, depending on $3$ angles, which goes to multiply ${\bf X}$
$$
{\bf R}\,\left( {{\bf A} + \,{\bf V}\;{\bf \Lambda }} \right) = \left( {{\bf A}' + {\bf V}'\;{\bf \Lambda }'} \right)\;\left( {{\bf P}\,{\rm or}\;{\bf Q}} \right)
$$
to solve by imposing the diagonalization condition as above. i.e.
$$
{\bf \Lambda } = {\bf V}^{\, - \,{\bf 1}} \;{\bf R}^{\, - \,{\bf 1}} \;\left( {{\bf A}'{\bf Q} - {\bf R}\,{\bf A}} \right) + {\bf V}^{\, - \,{\bf 1}} \;{\bf R}^{\, - \,{\bf 1}} {\bf V}'\;{\bf \Lambda }'{\bf Q}\;
$$
By imposing that the "6" off-diagonal elements of the RHS matrix be null,
we get system of $6$ equations in the $3$ unknowns ${\lambda}'$, and in the $3$ rotation angles,
for each of the $9$ ${\bf Q}$ matrices we are willing to consider as "crossing conditions".
( let comprise in ${\bf Q}$ also the particular cases of unit and permutation matrices).
Now, the homogeneous system is linear in the ${\lambda}'$ but contains product of $\sin $ and $ \cos$ of the angles,
and you are asking for a way to simplify that.
The first way I can see at the moment is that, restarting from the identity
$$
{\bf R}\,\left( {{\bf A} + \,{\bf V}\;{\bf \Lambda }} \right) = \left( {{\bf A}' + {\bf V}'\;{\bf \Lambda }'} \right)\;{\bf Q}
$$
taking the transposed (indicated by the hat)
$$
\left( {\overline {\bf A} + \;{\bf \Lambda }\,\overline {\bf V} } \right){\bf R}^{\, - \,{\bf 1}} = \overline {\bf Q} \left( {\overline {{\bf A}'} + {\bf \Lambda }'\;\overline {{\bf V}'} } \right)\;
$$
we can get rid of the rotation, by multiplying the first by the second on the left
$$
\left( {\overline {\bf A} + \;{\bf \Lambda }\,\overline {\bf V} } \right)\left( {{\bf A} + \,{\bf V}\;{\bf \Lambda }} \right) = \overline {\bf Q} \left( {\overline {{\bf A}'} + {\bf \Lambda }'\;\overline {{\bf V}'} } \right)\left( {{\bf A}' + {\bf V}'\;{\bf \Lambda }'} \right)\;{\bf Q}
$$
however at the cost of introducing an equation between two quadratic forms, symmetric, so $6$ equations.
Yet this equation has the advantage of not requiring $\bf V$ to be invertible.
At this point might be profitable to express each line with the position vector ($\bf a$)
normal to the direction vector ($\bf v$) and to normalize the latter.
That will give that $\overline {\bf A} \, {\bf V}$ has the main diagonal null, while for
$\overline {\bf V} \, {\bf V}$ it is unitary.
So we might possibly start from equating the diagonals ...
Sorry for not being this actually an answer, but this is the best help I can offer.
--- P.S. -----
As per your last comment, the case of two groups of incident lines introduces many simplifications with respect to the general case of being all skew, and can be approached quite differently. It is worthy that you open another post. In any case it remains to clarify the intersection scheme (e.g. two lines 1st group could intersect the same line in 2nd group, and the third any one of the remaining?)
Best Answer
Assuming $P$ is not parallel to $P'$, the unit-length axis of rotation is $k=\frac{P\times P'}{\lvert P\times P' \rvert}$, where $\times$ denotes the vector cross product. To find the angle of rotation, use dot product property $P \cdot P'=\lvert P\rvert\lvert P'\rvert \cos(\theta) $ to find the angle $\theta=\arccos\left(\frac{P\cdot P'}{\lvert P \rvert \lvert P' \rvert}\right)$ between $P$ and $P'$.
According to the "Matrix Notation" section of this Wikipedia article, the corresponding rotation matrix $R(k,\theta)$ is given by expression $I+\sin(\theta)[ k]_{\times}+(1-\cos(\theta))[k]_{\times}^2$, where $I$ is the identity matrix and the notation $[\cdot]_{\times}$ is explained here. This expression for $R$ is the referred to as the "matrix form of Rodrigues' rotation formula."
In other words, $Q'=R(k,\theta)Q$.
For speed, however, a computer implementation of this sort of axis-angle rotation should use quaternions instead of rotation matrices.
Edit: As noted by @peterwhy in the comments below, the above answer assumes that $P$ is not parallel to $P'$ and that we are looking for the unique axis of rotation $k$ and angle $\theta\in(0,\pi)$ such that the space curve $R(k,t)P$ from $P$ to $P'$ is a subset of the plane $\text{span}(P,P')$, where $t\in[0,\theta]$.
If we remove the 'space curve' requirement, we can uniquely determine a rotation axis $k$ and angle $\theta\in(0,\pi)$ given two pairs of vectors $P_1, P_1'$ and $P_2, P_2'$ such that $P_1,P_1'$ are not parallel and $P_2,P_2'$ are not parallel and $P_2$ and $P_2'$ do not have mirror symmetry over the plane bisecting $P_1$ and $P_1'$, i.e., $P_2'\neq 2 \frac{X\cdot P_2}{X\cdot X}X -P_2$, where $X=P_2-\left(P_2\cdot \frac{P_1'-P_1}{|P_1'-P_1|}\right)\frac{P_1'-P_1}{|P_1'-P_1|}$, the projection of $P_2$ onto the plane bisecting $P_1$ and $P_1'$.
Now, for convenience, let $k_0=\frac{(P_1'-P_1)\times(P_2'-P_2)}{|(P_1'-P_1)\times(P_2'-P_2)|}$. Assuming that $P_1,P_1'$ are not parallel and $P_2,P_2'$ are not parallel, if any non-undefined entry in element-wise division $\frac{k_0}{(P_1-(P_1\cdot k_0)k_0)\times(P_1'-(P_1'\cdot k_0)k_0)}$ is positive, $k=k_0$. Otherwise, $k=-k_0$. The corresponding angle $\theta$ is given by $\theta=\arccos\left(\frac{(P_1-(P_1\cdot k)k)\cdot(P_1'-(P_1'\cdot k)k)}{|(P_1-(P_1\cdot k)k)||(P_1'-(P_1'\cdot k)k)|}\right)$. If $\arccos\left(\frac{(P_1-(P_1\cdot k)k)\cdot(P_1'-(P_1'\cdot k)k)}{|(P_1-(P_1\cdot k)k)||(P_1'-(P_1'\cdot k)k)|}\right)\neq\arccos\left(\frac{(P_2-(P_2\cdot k)k)\cdot(P_2'-(P_2'\cdot k)k)}{|(P_2-(P_2\cdot k)k)||(P_2'-(P_2'\cdot k)k)|}\right)$, however, there is no axis or angle sending $P_1$ to $P_1'$ and $P_2$ to $P_2'$.
Note that there is likely a faster way than the one shown here to compute $k$ and $\theta$ under these new assumptions.
Edit 2: If instead given that $P_1=P_1'$ and $P_2$ is not parallel to $P_2'$, the method above the first edit section can be used on $P_1,P_1'$ to obtain $k$ and $\theta$. If $k$ is not parallel to $P_2\times P_2'$, however, there is no axis or angle sending $P_1$ to $P_1'$ and $P_2$ to $P_2'$.
If instead $P_1=P_1'$ and $P_2=-P_2'$, $k=\frac{P_1}{|P_1|}$ and $\theta=\pi$.
If instead $P_1=-P_1'$ and $P_2=-P_2'$, $\theta=\pi$ and $k=\frac{P_1\times P_2}{|P_1\times P_2|} $.
Finally, if instead $P_1$ is not parallel to $P_1'$ and $P_2=-P_2'$, $\theta = \pi$ and $k=\frac{P_2\times(P_1'-P_1)}{|P_2\times(P_1'-P_1)|}$.
I can go into more detail regarding the derivation and intuition behind the statements in "Edit" and "Edit 2" at @ZHIHA's request.