I have to demonstrate that $\textrm{div}\left(\frac{\mathbf{r}}{r^3}\right)=0. $
I know that $\text{div}(\mathbf{r}\frac{1}{r^3})= \frac{1}{r^3}\text{div}\mathbf{r}+\nabla\frac{1}{r^3}\mathbf{r}$. Since $\nabla\frac{1}{r^3}\mathbf{r}=0$ Then how $(\frac{1}{r^3}div\mathbf{r})=0?$
The first part of your reasoning is not correct. Indeed the gradient of $1/r^3$ is $$\vec{\nabla} \frac{1}{r^3} = -3\frac{1}{r^4}\,\frac{\vec{r}}{r}$$
Then $$\vec{\nabla} \frac{1}{r^3}\cdot\vec{r} = -\frac{3}{r^3}$$
Furthermore, $\mathrm{div}(\vec{r}) = 3$, which proves the equality (Indeed if $\vec{r} = \vec{x}+\vec{y}+\vec{z}$, you have $\mathrm{div}(\vec{r}) = \frac{\partial \vec{x}}{\partial x}+\frac{\partial \vec{y}}{\partial y}+\frac{\partial \vec{z}}{\partial z}=1+1+1=3$)