Levi Civita symbol $\epsilon_{ikl}$ is defined as it follows
$$\epsilon_{ikl} = \left\{
\begin{array}{cl}
1 & if\quad i\neq k\neq l\quad and \quad even \quad permutation\\
-1& if\quad i\neq k\neq l\quad and \quad odd\quad permutation\\
0 & otherwise
\end{array}\right.$$
From this definition, let's start with the contraction of $\epsilon_{ijk}$ in its first index:
$$\epsilon_{ikl}\epsilon_{imn}=\delta_{km}\delta_{ln}-\delta_{kn}\delta_{lm}\tag1$$
Where $\delta_{ik}$ is the Kronecker delta (identity matrix), a symmetric isotropic tensor and it is defined as it follows
$$\delta_{ik} = \left\{
\begin{array}{cl}
1 & if\quad i= k\\
0 & otherwise
\end{array}\right.$$
Contracting $(1)$ once more, $\textit{i.e.}$ multiplying it by $\delta_{km}$ we have
$$\delta_{km}\epsilon_{ikl}\epsilon_{imn}=\epsilon_{ikl}\epsilon_{ikn}=\delta_{km}(\delta_{km}\delta_{ln}-\delta_{kn}\delta_{lm})=\delta_{kk}\delta_{ln}-\delta_{kn}\delta_{kl}=\delta_{kk}\delta_{ln}-\delta_{ln}\tag2$$
Recall that $\delta_{lk} = \delta_{kl}$ due to symmetry properties and $\delta_{km}\delta_{km}=\delta_{kk}=\delta_{mm}$ since they are dummy indices (repeated indices indicated summation over this index).
Now comes the term $\delta_{ii}$, this quantity is a scalar, and represents the trace of the identity matrix in a n-dimensional space, therefore $\delta_{ii}=n$ and finally $(2)$ is written as it follows
$$\epsilon_{ikl}\epsilon_{ikn}=(\delta_{kk}-1)\delta_{ln}=(n-1)\delta_{ln}$$
If one contracts again, the following identity
$$\epsilon_{ikl}\epsilon_{ikl}=n(n-1)$$
In your case $n=3$.
Hope this helps you
The hint is useful. The problem's left-hand side expands to$$-3(r\cdot p)r\times m+3(r\cdot m)r\times p+p\times m,$$so you just need to multiply your BAC-CAB inference$$(r\cdot m)r\times p-(r\cdot p)r\times m=r[r\cdot p\times m]-p\times m$$by $3$, then rearrange, no Levi-Civita required.
Best Answer
We begin with the identity
$$\begin{align} \varepsilon_{abc}\varepsilon_{k\ell m}&=(\hat x_a\cdot(\hat x_b\times \hat x_c))(\hat x_k\cdot(\hat x_\ell\times \hat x_m))\\\\ \tag1 \end{align}$$
In $(1)$, all indices are fixed.
Now, there are two cases. In Case $(i)$, none of the indices $(k,\ell,m)$ is equal to either of the other two and hence the number $a$ is equal to one of $k$, $\ell$, or $m$. In Case $(ii)$, two (or all three) of the indices $(k,\ell,m)$ are equal, in which case $\varepsilon_{k\ell m}=0$.
In Case $(i)$, we can write $\hat x_a$ as the sum
$$\hat x_a=\delta_{ak}\hat x_k+\delta_{a\ell}\hat x_\ell+\delta_{am}\hat x_m\tag 2$$
where $\delta_{ij}$ is the Kronecker Delta and we are not summing over the indices.
Note that we can substitute $(2)$ in $(1)$ in both Cases $(i)$ and $(ii)$ since for Case $(ii)$, $\varepsilon_{k\ell m}=0$. Therefore, enforcing this substitution reveals
$$\begin{align} \varepsilon_{abc}\varepsilon_{k\ell m}&=\left(\left(\delta_{ak}\hat x_k+\delta_{a\ell}\hat x_\ell+\delta_{am}\hat x_m\right)\cdot(\hat x_b\times \hat x_c)\right)(\hat x_k\cdot(\hat x_\ell\times \hat x_m))\\\\ \tag3 \end{align}$$
Finally, exploiting the property of the scalar triple product
$$\hat x_k\cdot (\hat x_\ell\times \hat x_m)=\hat x_\ell\cdot (\hat x_m\times \hat x_k)=\hat x_m\cdot (\hat x_k\times \hat x_\ell)$$
leads to the coveted eqality
$$\begin{align} \left(\hat x_a\cdot(\hat x_b \times \hat x_c)\right)\left(\hat x_k\cdot(\hat x_{\ell} \times \hat x_m)\right)&=\delta_{ak}\left((\hat x_b \times \hat x_c)\cdot \hat x_k\hat x_k\cdot(\hat x_{\ell} \times \hat x_m)\right)\\\\ &+\delta_{a\ell}\left((\hat x_b \times \hat x_c)\cdot \hat x_{\ell}\hat x_{\ell}\cdot(\hat x_m\times \hat x_k)\right)\\\\ &+\delta_{am}\left((\hat x_b \times \hat x_c)\cdot \hat x_{m}\hat x_{m}\cdot(\hat x_k\times \hat x_{\ell})\right) \end{align}$$
as was to be shown!