Example 12. In triangle $ABC$, $|AC|=5 \mathrm{~cm}$, $|BC|-$ $-|AB|=2$ cm and $\widehat{BAC}: \widehat{ACB}=2$. Find the lengths of sides $AB$ and $BC$.
Solution (Fig. 14).

Let $|A B|=x$, then $|B C|=x+2$. Introduce an auxiliary unknown: $\widehat{A C B}=y$. Then $\widehat{B A C}=2 y$.

By the Law of Sines, we have:

$$
\frac{x}{\sin y}=\frac{x+2}{\sin 2 y}=\frac{5}{\sin \left(180^{\circ}-3 y\right)}
$$

or

$$
\left\{\begin{array}{l}
\frac{x}{\sin y}=\frac{x+2}{\sin 2 y} \\
\frac{x}{\sin y}=\frac{5}{\sin 3 y}
\end{array}\right.
$$

This system is easier to solve if we eliminate $x$ from it. From equation (12.1) $x=\frac{2}{2 \cos y-1}$, and from the equation $x=\frac{5 \sin y}{\sin 3 y}$. Thus,

$$
\frac{2}{2 \cos y-1}=\frac{5 \sin y}{\sin 3 y},
$$

from which

$$
2 \sin 3 y=10 \cos y \sin y-5 \sin y
$$

or

$$
4 \sin \frac{3 y}{2} \cos \frac{3 y}{2}=10 \sin \frac{y}{2} \cos \frac{3 y}{2}
$$

Obviously, $\cos \frac{3 y}{2} \neq 0$. Otherwise, $\frac{3 y}{2}=90^{\circ}$, i.e., $3 y=180^{\circ}$, and thus $\widehat{A B C}=0^{\circ}$, which contradicts the condition. Dividing both sides of equation (12.4) by $g(y)=\cos \frac{3 y}{2}$.

Note that when multiplying both sides of equation (12.3) by $\varphi(y)=(2 \cos y-1) \sin 3 y$, we did not prove that the values of $y$ for which $\varphi(y)=0$ do not satisfy the condition of the problem. The reason is that the specified transformation of equation (12.3) can only introduce extraneous solutions, which are filtered out during subsequent verification according to the meaning of the problem. However, dividing both sides of equation (12.4) by $g(y)=\cos \frac{3 y}{2}$ poses a risk of losing solutions. By proving that $g(y) \neq 0$, we have shown that no solutions are lost during this transformation.

Thus, we obtain the equation

$$
5 \sin \frac{y}{2}=2 \sin \frac{3 y}{2}
$$

or

$$
\sin \frac{y}{2}-8 \sin ^{3} \frac{y}{2}=0
$$

Since $\sin \frac{y}{2} \neq 0$ (otherwise $y=360^{\circ}$, which contradicts the condition), then $1-8 \sin ^{2} \frac{y}{2}=0$; hence $\sin ^{2} \frac{y}{2}=\frac{1}{8}$. Since $x=\frac{2}{2 \cos y-1}$, it is sufficient to find the value of $\cos y$. But $1-\cos y=2 \sin ^{2} \frac{y}{2}$, so $\cos y=\frac{3}{4}$, and then $x=4$.

Since the value $x=4$ satisfies the condition of the problem (verify this independently), we obtain:

$$
|A B|=4 \mathrm{~cm},|B C|=6 \mathrm{~cm}
$$

A successful choice of an auxiliary unknown plays a crucial role in solving problems by the method of forming equations. In the next example, we will consider two ways to choose an auxiliary unknown.