Step 1: Write the scalar triple product as a determinant.
The box product $\vec a\cdot(\vec b\times\vec c)$ is the determinant of the component matrix, \[ f(x)=\begin{vmatrix} x & -2 & 3\\ -2 & x & -1\\ 7 & -2 & x\end{vmatrix}. \]
Step 2: Expand to a cubic in $x$.
Expanding along the first row, \[ f(x)=x(x^2-2)+2(-2x+7)+3(4-7x)=x^3-27x+26. \]
Step 3: Differentiate and find critical points.
$f'(x)=3x^2-27=0$ gives $x^2=9$, so $x=\pm3$.
Step 4: Pick the local maximum.
Using $f''(x)=6x$: at $x=-3$, $f''=-18<0$, so $x=-3$ is the local maximum. Hence $x_0=-3$.
Step 5: Substitute $x=-3$ into the vectors.
$\vec a=-3\vec i-2\vec j+3\vec k$, $\vec b=-2\vec i-3\vec j-\vec k$, $\vec c=7\vec i-2\vec j-3\vec k$.
Step 6: Add the three dot products.
$\vec a\cdot\vec b=6+6-3=9$, $\vec b\cdot\vec c=-14+6+3=-5$, $\vec c\cdot\vec a=-21+4-9=-26$. Summing, $9-5-26=-22$, which is option 2.
\[ \boxed{\vec a\cdot\vec b+\vec b\cdot\vec c+\vec c\cdot\vec a=-22} \]