In deriving an expression for $p_r$, a particle's radial momentum, I am unsure what is happening at a certain step. The derivation given in The Physics of Quantum Mechanics by Binney and Skinner is as follows: $$$$ $$p_r=\frac{1}{2}(\hat{\mathbf{r}}\cdot\mathbf{p}+\mathbf{p}\cdot\hat{\mathbf{r}})$$ $$=\frac{1}{2}(\frac{\mathbf{r}}{r}\cdot\mathbf{p}+\mathbf{p}\cdot\frac{\mathbf{r}}{r})$$ because $\hat{\mathbf{r}}=\frac{\mathbf{r}}{r}$. Putting in $\mathbf{p}=-i\hbar\vec{\nabla}$ we get $$p_r=\frac{1}{2}(\frac{\mathbf{r}}{r}\cdot-i\hbar\vec{\nabla}+-i\hbar\vec{\nabla}\cdot\frac{\mathbf{r}}{r})$$ or $$p_r=-\frac{i\hbar}{2}(\frac{1}{r}\mathbf{r}\cdot\vec{\nabla}+\vec{\nabla}\cdot\mathbf{r}\frac{1}{r})$$ Now here is the part that confuses me: Because $r\frac{\partial}{\partial r}=x\frac{\partial}{\partial x}+y\frac{\partial}{\partial y}+z\frac{\partial}{\partial z}=\mathbf{r}\cdot\vec{\nabla}$ and $\vec{\nabla}\cdot\mathbf{r}=3$ we can say $$p_r=-\frac{i\hbar}{2}(\frac{\partial}{\partial r}+\frac{3}{r}-\frac{r}{r^2}+\frac{\partial}{\partial r})$$ I can clearly see where the first two terms of that last equation come from, but I don't see where the $-\frac{r}{r^2}+\frac{\partial}{\partial r}$ comes into play.
The only step after that last equation is to simplify and you get $$p_r=-i\hbar(\frac{\partial}{\partial r}+\frac{1}{r})$$ which I know is correct. Could someone please clarify that middle step?