index notation for $(A \times \nabla) \times B$ I can't figure out this one, been trying for hours but always get wrong answer.

Simplify with index notation
$(A\times \nabla) \times B$

Can anyone just show me how to do it once? I think i will get the hang of it if i just see it.
 A: I will use Einstein notation, that is, a product of two quantities with the same index means summation so $a_i b_i$ means $\sum_{i=1}^3 a_i b_i$ (I assumed the dimension of your vector space is $3$).
I will also use the Levi-Civita symbol $\varepsilon_{ijk}$ which has properties $\varepsilon_{123} = 1$ and  $\varepsilon_{ijk} = - \varepsilon_{jik}$, and $\varepsilon_{ijk} = - \varepsilon_{ikj}$ (exchanging any two of its indices switches the sign).
Levi-Civita symbol can be used to express the components of cross product. If $ \mathbf{a} \times \mathbf{b} = \mathbf{c}$ then $i$-th component $c_i$ of vector $\mathbf{c}$ has
$$ c_i = \varepsilon_{ijk} a_j b_k $$
Levi-Civita symbol also has the property
$$\varepsilon_{ijk} \varepsilon_{imn} = \delta_{jm} \delta_{kn} - \delta_{jn} \delta_{km} \tag{1}$$
where $\delta_{ij}$ is Kronecker delta which has property
$$ \delta_{ij} a_j = a_i \tag{2}$$
So we come back to our example. Let's compute $i$-th component of $\mathbf{A} \times \pmb{\nabla}$:
$$ [\mathbf{A} \times \pmb{\nabla}]_i = \varepsilon_{ijk} A_j \nabla_k $$
Now we can compute $m$-th component of the whole vector $(\mathbf{A} \times \pmb{\nabla}) \times \mathbf{B}$ because we can view it as cross product of $\mathbf{A} \times \pmb{\nabla}$ and $\mathbf{B}$.
$$ [(\mathbf{A} \times \pmb{\nabla}) \times \mathbf{B}]_m = \varepsilon_{min} (\varepsilon_{ijk} A_j \nabla_k) B_n = - \varepsilon_{imn} \varepsilon_{ijk} A_j \nabla_k B_n = - (\delta_{jm}\delta_{kn} - \delta_{jn}\delta_{km}) A_j \nabla_k B_n = - \delta_{jm}\delta_{kn} A_j \nabla_k B_n + \delta_{jn}\delta_{km} A_j \nabla_k B_n = - A_m \nabla_k B_k + A_n \nabla_m B_n $$
where we used properties $(1)$ and $(2)$.
Note: In my opinion, it could be seen more easily without using index notation:
$$ (\mathbf{A} \times \pmb{\nabla}) \times \mathbf{B} = (\mathbf{A} \times \pmb{\nabla}) \times \overset{\downarrow}{\mathbf{B}} = - \overset{\downarrow}{\mathbf{B}} \times (\mathbf{A} \times \pmb{\nabla}) = - \mathbf{A} (\overset{\downarrow}{\mathbf{B}} \cdot \pmb{\nabla}) + \pmb{\nabla} (\overset{\downarrow}{\mathbf{B}} \cdot \mathbf{A}) = \pmb{\nabla} (\overset{\downarrow}{\mathbf{B}} \cdot \mathbf{A}) - \mathbf{A} \operatorname{div} \mathbf{B}
 $$
A: If $A$ is a constant vector, then
$$
\begin{align}
(A\times\nabla)\times B
&=\left(\begin{bmatrix}
a_1\\a_2\\a_3
\end{bmatrix}
\times
\begin{bmatrix}
\partial_1\\\partial_2\\\partial_3
\end{bmatrix}\right)
\times
\begin{bmatrix}
b_1\\b_2\\b_3
\end{bmatrix}\\
&=\begin{bmatrix}
a_2\partial_3-a_3\partial_2\\
a_3\partial_1-a_1\partial_3\\
a_1\partial_2-a_2\partial_1
\end{bmatrix}
\times
\begin{bmatrix}
b_1\\b_2\\b_3
\end{bmatrix}\\[3pt]
&=\begin{bmatrix}
a_3\partial_1b_3-a_1\partial_3b_3-a_1\partial_2b_2+a_2\partial_1b_2\\
a_1\partial_2b_1-a_2\partial_1b_1-a_2\partial_3b_3+a_3\partial_2b_3\\
a_2\partial_3b_2-a_3\partial_2b_2-a_3\partial_1b_1+a_1\partial_2b_1
\end{bmatrix}\\[3pt]
&=\begin{bmatrix}
a_3\partial_1b_3+a_1\partial_1b_1+a_2\partial_1b_2\\
a_1\partial_2b_1+a_2\partial_2b_2+a_3\partial_2b_3\\
a_2\partial_3b_2+a_3\partial_3b_3+a_1\partial_2b_1
\end{bmatrix}
-\begin{bmatrix}
a_1\partial_1b_1+a_1\partial_2b_2+a_1\partial_3b_3\\
a_2\partial_1b_1+a_2\partial_2b_2+a_2\partial_3b_3\\
a_3\partial_1b_1+a_3\partial_2b_2+a_3\partial_3b_3
\end{bmatrix}\\[6pt]
&=\nabla(A\cdot B)-A\nabla\cdot B
\end{align}
$$
The last step assumes that $A$ is constant.
