Given: The points A (3, 4, 5) and B (-1, 3, -7)
$\Rightarrow$ x1 = 3, y1 = 4, z1 = 5; x2 = -1, y2 = 3, z2 = -7;
PA2 + PB2 = k2 …(i)
Let the point be P (x, y, z).
Now, by Distance Formula, we know that the distance between two points P (x1, y1, z1) and Q (x2, y2, z2) is given by $\mathrm{PQ}=\sqrt{\left(\mathrm{x}_{2}-\mathrm{x}_{1}\right)^{2}+\left(\mathrm{y}_{2}-\mathrm{y}_{1}\right)^{2}+\left(\mathrm{z}_{2}-\mathrm{z}_{1}\right)^{2}}$.
So, PA $=\sqrt{(3-\mathrm{x})^{2}+(4-\mathrm{y})^{2}+(5-\mathrm{z})^{2}}$
And PB $=\sqrt{(-1-\mathrm{x})^{2}+(3-\mathrm{y})^{2}+(-7-\mathrm{z})^{2}}$
Now, substituting these values in (i), we have
[(3 - x)2 + (4 - y)2 + (5 - z)2] + [(-1 - x)2 + (3 - y)2 + (-7 - z)2] = k2
⇒ [(9 + x2 – 6x) + (16 + y2 – 8y) + (25 + z2 – 10z)] + [(1 + x2 + 2x) + (9 + y2 – 6y) + (49 + z2 + 14z)] = k2
⇒ 9 + x2 – 6x + 16 + y2 – 8y + 25 + z2 – 10z + 1 + x2 + 2x + 9 + y2 – 6y + 49 + z2 + 14z = k2
⇒ 2x2 + 2y2 + 2z2 - 4x - 14y + 4z + 109 = k2
⇒ 2x2 + 2y2 + 2z2 - 4x - 14y + 4z = k2 – 109
⇒ 2 (x2 + y2 + z2 – 2x – 7y + 2z) = k2 – 109
$\Rightarrow$ x2 + y2 + z2 - 2x - 7y + 2z $=\frac{k^{2}-109}{2}$

