This is a busy-work problem.Find the radius of smallest sphere that is tangent to both the lines
L1 :x=t+1,y=2t+4,z=−3t+5 and L2 :x=4t−12,y=t+5,z=t+17.
Why is the length of the perpendicular equal to the diameter of the smallest sphere tangent to both lines?This is a busy-work problem.
Although I have not done the basic algebra, it appears that those two lines are skew lines. (you may need to show that)
Two skew lines share a unique perpendicular. Its length is the diameter of the sphere.
Now, one does not need to find that perpendicular. Just find the distance between the two lines.
Your text ought to discuss that somewhere. It may be in a problem set.