Just use the 3-D distance formula d^2 = ((x2-x1)^2 + (y2-y1)^2 + (z2-z1)^2)
You can ask a new question or answer this question.