The overall roadmap for this solution is to first build the vector between the two given points, then build a formula for the distance between the vector and the point given for the star Gliese 061, then take the derivative of that formula and set it equal to zero in order to find the minimum distance, and finally compare that distance with the given detection limit.
Following the roadmap, let's first build the vector between the two given points. We can do this by subtracting one from the other and then adding this difference vector to one of the other points with a parameter that allows us to parameterize any point along that line.
Let's make this concrete. Let's define a vector
v = B - A = (-5,4,3).
Now we can build a vector using the parameter t by adding v to A to give a trajectory vector
r(t) = (-3,-8,-6) + t * (-5,4,3).
In order to find the distance between the vector and the given star, we use the distance formula in 3-dimensions to find
d(t) = sqrt[(-9 + 5t)2 + (8 - 4t)2 + (6 - 3t)2].
Taking the first derivative and setting it equal to zero is kind of involved, so I will let you work through it yourself. The answer you will get is
d/dt [d(t)] = (50t - 95)/d(t) = 0,
which leads to
t = 1.9
at which point the minimum distance between the star and the trajectory of the ship is found to be about
d(t = 1.9) = 0.707,
which means that since this is greater than 0.5, the ship will not detect the star.