This problem can be thought of as trying to minimize a function of two variables. The typical point on line P can be thought of as (1 - 3t, 4 - 3t, -4 - 2t), while the typical point on Q is (5, -1 - 2u, -3 - u). The distance between these two points can now be calculated as √((4 + 3t)2 + (-5 - 2u + 3t)2 + (1 - u + 2t)2). Minimizing the distance, since it is always positive, is the same as minimizing its square, so we can dispense with the messy algebra involved with the radical. We just have to do some clean algebra.
(D(t, u))2 = 16 + 24t + 9t2 + 25 + 20u + 4u2 - 30t - 12tu + 9t2 + 1 - 2u + u2 + 4t - 4tu + 4t2 = 42 - 2t + 18u + 22t2 + 5u2 - 16tu.
Now for the calculus: ∂D/∂t = 44t - 16u - 2 and ∂D/∂u = 18 + 10u - 16t. To find the minimum, we must solve the equations resulting from setting both of these to zero, which results in t = 67/46 and u = -32/23. Now we are left with some very messy arithmetic, as we find the distance to be the square root of ((385/46)2 + (99/46)2 + (244/46)2). I get 10.140 to three decimal places.

Martin C.
09/26/23