For Q2, I think you're missing some info - mainly what point P is.

To find the shortest distance means find the pointperpendicularon line Q to point P.

In this case, you need to solve:

PQ.u = 0

u = (2, -1, 4) % taken from x=2t, y=-t & z=4t. i.e make t=1, point u therefore lies on line Q.

PQ = P - Q

Q = (2t, -t, 4t)

P= ?? %need to have point P here. We can't use (x,y,z) as we already have unknown variable t.

Unless you mean use point P from Q1. In that case

P = (3, 0, 1)

PQ = (3-2t, t, 1-4t)

PQ.u = (6 - 4t) - t + (4 - 16t) = 0

=> -21t +10 = 0

=> t = 10/21

Put this back into Q and you get:

(20/21, -10/21, 40/21) %this is the closest point on line Q to point P.

good luck with the exam!

Were there any questions you found particularly difficult?