I've been having trouble understanding the Leibniz's rule when using index notation.
This is how far I've managed to expand the expression: $$ \begin{array}{c|lcr} \overline{r} \times \left (\bigtriangledown \times \overline{A} \right ) \\= \epsilon_{ijk}r_j\left (\bigtriangledown \times \overline{A} \right )_k \\= \epsilon _{ijk}r_j \epsilon _{klm}\partial_l A_m \\= \left (\delta_{il} \delta_{jm} -\delta_{im}\delta_{jl} \right )r_j \partial_lA_m \\= r_j\partial_iA_j - r_j\partial_jA_i \end{array} $$
However, the solution is: $$ =\partial_i\left (x_jA_j \right )-\partial_j\left (x_jA_i \right )+2A_i $$ How come one can move the partial derivative and get a thrid term, there must be a fundamental piece of the puzzle that I don't understand and therfore I'm seeking for help.
By the product rule $$\begin{align}\partial_i\left (x_jA_j \right )-\partial_j\left (x_jA_i \right )+2A_i &= (x_j\partial_iA_j+A_j\partial_ix_j)-(x_j\partial_jA_i+A_i\partial_jx_j)+2A_i \\ &= (x_j\partial_iA_j+A_j\delta_{ij})-(x_j\partial_jA_i+A_i(3))+2A_i \\ &= x_j\partial_iA_j+A_i-x_j\partial_jA_i-3A_i+2A_i \\ &= x_j\partial_iA_j -x_j\partial_jA_i\end{align}$$ which is exactly what you have.
Note that, as a basic proof strategy, sometimes when verifying a theorem you'll want to work forward and backwards and then meet in the middle.