Well, $\rho^2 = \sum_i x_i^2$ hence $D \rho^2-\sum_i x_i^2 = (D-1)\rho^2$ then the $2$ cancels with the $3$ in the denominator leaving the requested expression $\frac{D-1}{\rho}$.
The other equality arises from the observation that $$ \frac{\partial \rho}{\partial x_j} = \frac{\partial }{\partial x_j} \sqrt{ \sum_i x_i^2} = \frac{1}{2\rho}\frac{\partial }{\partial x_j}\sum_i x_i^2 = \frac{x_j}{ \rho}$$ then differentiate once more, $$ \frac{\partial }{\partial x_j} \frac{x_j}{ \rho} = \frac{\rho-\frac{\partial \rho}{\partial x_j}x_j}{\rho^2}=\frac{\rho^2-x_j^2}{\rho^3}$$ then change the $j$ to $i$ and sum to see the first equality.