Question: Common perpendicular to the two straigh lines

Please write for me a proceduce in order to write the eqution of the common perpendicular to the two skewline 

d: x = 3*t - 7, y = -2*t +4, z = 3*t + 4 and

l: x = m + 1, y = 2m - 9, z = -m - 12.

I did:

with(geom3d);

line(d,[3*t-7,-2*t+4,3*t+4],t);

line(l,[m + 1,2*m - 9, - m - 12],m);

u:=ParallelVector(d);

v:=ParallelVector(l);

with(linalg);

w:=crossprod(u,v);

a:=crossprod(u,w);

plane(P,[point(A,-7,4,4),a],[x,y,z]);

intersection(M,l,P);

coordinates(M);

Equation(line(d1,[M,w],t));

Please Wait...