12. The sum of the longest side and the second longest side of a triangle is 12, the area is $17 \frac{1}{2}$ times the sine value of the angle between these two sides, and one of the interior angles is $120^{\circ}$. Find the lengths of the three sides of this triangle.
12. Let the longest side, the second longest side, and the shortest side be $x$, $y$, and $z$ respectively, and the angle between the longest side and the second longest side be $\theta$, then we have
$$
\left\{\begin{array}{l}
x+y=12 \\
\frac{1}{2} x y \sin \theta=17 \frac{1}{2} \sin \theta \\
x^{2}=y^{2}+z^{2}-2 y z \cos 120^{\circ}
\end{array}\right.
$$

From (1) and (2), we get $x=7, y=5$. Substituting into (3), we can get $z^{2}+5 z-24=0, z=3$ or $z=-8$ (discard).