first, convert the straight line equation into a symmetrical formula and obtain its direction vector n1=(a1,b1,c1),n2=(a2,b2,c2).
cross-multiply the two vectors to obtain their common vertical vector n = (x, y, z). select points a and b (arbitrary) on the two straight lines to obtain the vector ab. find the projection of the vector ab in the direction of the vector n, which is two the distance between straight lines on opposite sides (the shortest distance), do you know how to find it?
d=|vector n*vector ab|/|vector n| (the above is the quantitative product of the two vectors, the following is the modulus), let the intersection points be c, d, and bring them into the symmetry of the common perpendicular n, and because c , the two points d respectively satisfy the linear equation at the beginning, so we get two consecutive equations about c (or d) and solve them separately.
formula: