Suppose that, the given lines are,
# L_1 : (x-x_1)/l_1=(y-y_1)/m_1=(z-z_1)/n_1, and, #
# L_2 : (x-x_2)/l_2=(y-y_2)/m_2=(z-z_2)/n_2#.
Also, let, #A=A(x_1,y_1,z_1), B=B(x_2,y_2,z_2), and, #
#vec(d_1)=(l_1,m_1,n_1), and, vec(d_2)=(l_2,m_2,n_2)#.
In our Problem, we have,
#A(1,2,3), B(2,4,5), vec(d_1)=(2,3,4), &, vec(d_2)=(3,4,5)#.
#:. vec(AB)=B(2,4,5)-A(1,2,3)=(1,2,2)#.
The condition that the lines #L_1 and L_2# be skew, is,
#vec(AB)*vec(d_1)xxvec(d_2)=[vec(AB),vec(d_1),vec(d_2)]ne0#.
We have, #[vec(AB),vec(d_1),vec(d_2)],#
#=|(1,2,2),(2,3,4),(3,4,5)|#,
#=1(15-16)-2(10-12)+2(8-9)#,
#=-1+4-2=1ne0#.
#:. L_1 and L_2# are skew lines.
The shortest distance (SD) btwn. them is given by,
#SD=|vec(AB)*vec(d_1)xxvec(d_2)|/|vec(d_1)xxvec(d_2)|#.
Since, #vec(d_1)xxvec(d_2)#,
#=|(i,j,k),(2,3,4),(3,4,5)|#,
#=i(15-16)-j(10-12)+k(8-9)#,
#=-i+2j-k#,
#=(-1,2,-1)#.
#rArr |vec(d_1)xxvec(d_2)|=sqrt{(-1)^2+(2)^2+(-1)^2}=sqrt6#,
#"The desired SD="|1|/sqrt6=sqrt6/6#.