Variable substitution with 3 variables I'm trying to determine the following triple integral
$$
\iiint_{K}\left[\left(x - a\right)^{2} +
\left(y - b\right)^{2} + \left(z - c\right)^2\right]{\rm d}x\,{\rm d}y\,{\rm d}z,\quad
K = \left\{\left(x,y,z\right): x^{2} + y^{2} + z^{2}
\leq 1\right\}.
$$
I tried the following variable substitution
$$\begin{cases} 
x = r\sin\left(\theta\right)\cos\left(\varphi\right) + a
\\[1mm]
y = r\sin\left(\theta\right)\sin\left(\varphi\right) + b
\\[1mm] 
z = r\cos\left(\theta\right) + c 
\end{cases}$$
with
$$
0<r<1 \quad , \quad 0< \theta < \pi \quad , \quad
0 < \varphi < 2\pi
$$
and I'm getting $4\pi/5$, which is wrong, the answer should be $4\pi/5 + 4\pi\left(a^{2} + b^{2} + c^{2}\right)/3$, but I can't really find where I missed up !.

By using your change of coordinates and the given limits you are not evaluating the given integral, but $\iiint_K (x^2+y^2+z^2)  dxdydz$.
The correct limits are different and not so easy to find.
On the other hand, by expanding the squares, we split the integral into three terms,
$$\begin{align}
I&=\iiint_K ((x-a)^2+(y-b)^2+(z-c)^2)  dxdydz \\
&=\iiint_K (x^2+y^2+z^2)  dxdydz
-2\iiint_K (ax+by+cz)  dxdydz\\
&\qquad+(a^2+b^2+c^2) \iiint_K  1 dxdydz
\end{align}$$
and the integral in the middle is zero by symmetry (for instance
$\iiint_K ax  dxdydz=0$ because the integrand function is $x$-odd and $K$ is symmetric with respect to the plane $x=0$).
Finally, using the spherical coordinates (centered at the origin),
$$I=2\pi\int_{r=0}^1\int_{\phi=0}^\pi r^2\cdot r^2\sin(\phi)  drd\phi+0+(a^2+b^2+c^2)|K|=\frac{4\pi}{5} +\frac{4\pi}{3}(a^2+b^2+c^2).$$
