Step 1: Compute the determinant of the matrix.
Given,
\[
A=
\begin{bmatrix}
-2 & x & 1\\
x & 1 & 1\\
2 & 3 & -1
\end{bmatrix}
\]
We calculate
\[
\det(A)
=
\begin{vmatrix}
-2 & x & 1\\
x & 1 & 1\\
2 & 3 & -1
\end{vmatrix}
\]
Expanding along the first row,
\[
\det(A)
=
-2
\begin{vmatrix}
1 & 1\\
3 & -1
\end{vmatrix}
-
x
\begin{vmatrix}
x & 1\\
2 & -1
\end{vmatrix}
+
1
\begin{vmatrix}
x & 1\\
2 & 3
\end{vmatrix}
\]
Step 2: Evaluate the minors.
First minor:
\[
\begin{vmatrix}
1 & 1\\
3 & -1
\end{vmatrix}
=(1)(-1)-(1)(3)
=-1-3=-4
\]
Second minor:
\[
\begin{vmatrix}
x & 1\\
2 & -1
\end{vmatrix}
=x(-1)-2
=-x-2
\]
Third minor:
\[
\begin{vmatrix}
x & 1\\
2 & 3
\end{vmatrix}
=3x-2
\]
Substituting these values,
\[
\det(A)
=
-2(-4)-x(-x-2)+(3x-2)
\]
\[
=8+x^2+2x+3x-2
\]
\[
=x^2+5x+6
\]
\[
=(x+2)(x+3)
\]
Step 3: Find the roots.
Since
\[
\det(A)=0,
\]
we get
\[
(x+2)(x+3)=0
\]
Thus the roots are
\[
l=-2,\qquad m=-3
\]
Step 4: Compute \(l^3-m^3\).
\[
l^3-m^3
=
(-2)^3-(-3)^3
\]
\[
=-8-(-27)
\]
\[
=-8+27
\]
\[
=19
\]
Step 5: Final conclusion.
Hence,
\[
\boxed{19}
\]
which corresponds to option (3).