Prove that the gradient of a unit vector equals 2/magnitude of the vector Let $\vec r=(x,y,z)$
Firstly find $\vec \nabla (\frac 1 r)$ where r is the magnitude of $\vec r$.
I think I've done this correctly to get $-x(x^2+y^2+z^2)^{-\frac32} \hat i-y(x^2+y^2+z^2)^{-\frac32} \hat j-z(x^2+y^2+z^2)^{-\frac32} \hat k$
Secondly prove that $\vec \nabla. \frac{\vec r}{r}=\frac2r$
I've really got no idea for the second part.

Let $\vec r=(x,y,z)=v_x\hat{i}+v_y\hat{j}+v_z\hat{k}$ so that $v_x=x$, $v_y=y$ and $v_z=z$. 
Note that the magnitude of the vector $\vec r$ is given by $$r=(v_x^2+v_y^2+v_z^2)^{1/2}=(x^2+y^2+z^2)^{1/2}$$
For the second part, the divergence operator on vector $\vec r$  (denoted by $\nabla\cdot\vec r$) results in a signed scalar, and is given by the following equation:-
$$\nabla\cdot\vec r = \frac{\partial v_x}{\partial x}+\frac{\partial v_y}{\partial y}+\frac{\partial v_z}{\partial z}$$
As we need to apply the divergence operator to $\frac{\vec r}{r}$ we can use the product rule, making use of your answer to the first part (which is indeed correct, and highlighted in blue):-
$$\nabla\cdot\frac{\vec r}{r}=\frac{1}{r}(\nabla\cdot\vec r)+\vec r\cdot(\color{blue}{\nabla\frac{1}{r}})\\=\frac{1}{r}\left(\frac{\partial v_x}{\partial x}+\frac{\partial v_y}{\partial y}+\frac{\partial v_z}{\partial z}\right)+\left(v_x\hat{i}+v_y\hat{j}+v_z\hat{k}\right)\cdot\left(\color{blue}{-\frac{x}{r^{3}}\hat{i}-\frac{y}{r^{3}}\hat{i}-\frac{z}{r^{3}}\hat{k}}\right)\\=\frac{1}{r}\left(\frac{\partial x}{\partial x}+\frac{\partial y}{\partial y}+\frac{\partial z}{\partial z}\right)-\left(\frac{x^2+y^2+z^2}{r^3}\right)\\=\frac{3}{r}-\frac{1}{r}=\frac{2}{r}$$
