Answer: 12.

Solution. Note that triangles $D E C$ and $B D A$ are equal. Indeed, $D E=B D, E C=$ $D A$ and $\angle D E C=180^{\circ}-\angle B E D=180^{\circ}-\angle B D C=\angle B D A$. From this, it follows that $D C=A B=7$ and $\angle D C E=\angle B A D$ (Fig. 3). From the equality of these angles, it follows that triangle $A B C$ is isosceles, $7=A B=B C=2+E C$, from which we get $5=E C=A D$ and $A C=A D+D C=5+7=12$.

![](https://cdn.mathpix.com/cropped/2024_05_06_2fdcf97aa9799d0d4cd6g-26.jpg?height=270&width=711&top_left_y=91&top_left_x=371)

Fig. 3: to the solution of problem 8.4
Problem 8.4. Points $D$ and $E$ are marked on sides $A C$ and $B C$ of triangle $A B C$ respectively, such that $A D=E C$. It turns out that $B D=E D, \angle B D C=\angle D E B$. Find the length of segment $A C$, given that $A B=7$ and $B E=2$.