Let's say there are 2 sphere $S_1$, $S_2$ with same radius $k$,
where the centers of them are $C_1:(x_1,y_1,z_1)$, $C_2:(x_2,y_2,z_2)$, respectively.
If there exists superposition, where the distance $D$ between $C_1, C_2$ is less than $2k;$
D=$\sqrt{(x_1-x_2)^2+(y_1-y_2)^2+(z_1-z_2)^2}<2k$
Let's say we are supposed to move $C_1$ to avoid this superposition.
What would be the minimum distance of movement $d:(x,y,z)$ to avoid this superposition?
;the exact component of that vector $d$ to avoid superposition.
Create a vector $\vec{v} = C_1-C_2 = (x_1-x_2, y_1-y_2, z_1-z_2)$. Now, because of the symmetricity of a sphere its as simple as this: If $|\vec{v}| \geq 2k$ then the answer is there already is no superposition, otherwise the answer is $2k-|\vec{v}|$.