The question is to find the length of AB. I'm currently studying civil engineering, but I'm trying to refresh some old knowledge as I got a part time job this semester as a math assistant at a middle school. You're not supposed to use trigonometry.
My attempt involves similarity of triangles of course, since all the angles are obviously identical.
$\frac{AB}{AD} = \frac{3}{6}$
$\frac{AB}{AB+BD} = \frac{1}{2}$
In the solution they somehow know that the length of BD is 4. I figured out that they're at least equal using trigonometry, but I don't see where the 4 comes from.

Updated answer:
The picture in the question is missing $BD = 4$.
From $\frac{AB}{AB+4} = \frac{1}{2}$, we have $2 AB = AB + 4$, so $AB=4$.