While trying to find out the electric field due to a charged sphere without using Gauss Law, I encountered an integration $$iiintfrac{r^2sintheta drdtheta dphi}{left|vec{r}-vec{r’}right|^3}left(vec{r}-vec{r’}right)$$

Here, $vec{r’}$ is a constant, while $vec{r}$ is the radial vector.

The exact part which is troubling me the most is $$int_0^{r_o}frac{r^2left(vec{r}-vec{r’}right)}{left|vec{r}-vec{r’}right|^3}dr$$

or, $$int_0^{r_o}frac{r^2(widehat{vec{r}-vec{r’}})}{left|vec{r}-vec{r’}right|^2}dr$$

Here, the unit vector isn’t $hat{r}$, which can be written as $costhetacosphihat{i}+costhetasinphihat{j}+sinthetahat{k}$, as I saw in another answer Vector valued integral in spherical coordinates.

Rather, it is $(widehat{vec{r}-vec{r’}})$. This cannot be taken out of the integral as the unit vectors of Cartesian coordinates $hat{i}, hat{j}$ and $hat{k}$, since they are dependent on $theta$ and $phi$. So, how exactly should I proceed?