# Understanding Partial derivative - how they work in this example

$$[(r\frac{\partial}{\partial r})^2+ r\frac{\partial}{\partial r}] = \frac{\partial^2}{\partial r^2} + \frac{2}{r}\frac{\partial}{\partial r} = (\frac{1}{r}\frac{\partial}{\partial r}r)^2$$
I understand how $$(r\frac{\partial}{\partial r})^2 = r\frac{\partial}{\partial r} + r^2\frac{\partial^2}{\partial r^2}$$, however, for the previous equation I am at a lost. Any help would be really appreciated.