3D Engine Geometry Shortest distance from a point to a line in 3D

My notes for this topic are not very clear and certain steps of how to do this type of calculation have been skipped. I was hoping someone could do this sum out for me so I could use it as an example it would really be appreciated.

s = starting point v = any q =direction from any point

d =

._____________________

.| ........................ 2

.| .........2 [(q -s).v]

.| (q -s) - _________

.|................ .....2

V................|v|

Find the distance between the point q = [0,2,2] and the line defined by: p(t)= [ 0,0,0,] + t[1,0,0]