You could go crazy on this with a vector-based math. But since the line equation is so nicely expressed in terms of the parameter t, why not go with that? Let the distance be a Pythagorean-theorem calculated item; then the distance to the line (for any value of t) is ((.delta.x)^2 + (.delta.y)^2 + (.delta.z)^2 )^0.5 [from x^2 +y^2 +z^2 = r^2]
Now, substitute in for P and the line-intercept, letting t "float" for a moment:
D = .sqrt.((7+7t)^2 + (6-7t)^2 + (4-t)^2 ) =
.sqrt. (49+98t+49t^2 + 36-84t+49t^2 + 16-8t+t^2)=
Perhaps you already know how to solve this for a minimum, you do a process called differentiating for t:
d(101+6t+99t^2)/dt = 6 + 198t [note what happened: each term was at^n and differentiated to nat^(n-1)]
This has value 0 (local minima and maxima of functions have a slope of 0) at 6=198t --> t=198/6 = 33
Then D = sqrt(101+6*33+99*33^2) = I better leave some work for you to do!
Hope this got you thinking -- you can now also calculate the intercept, using your new value for t!