4. In a convex quadrilateral $A B C D$, the angles at vertices $B, C$, and $D$ are $30^{\circ}, 90^{\circ}$, and $120^{\circ}$ respectively. Find the length of segment $A B$, if $A D=C D=2$.
Solution:

Extend lines $A B$ and $C D$ to intersect at point $E$, the resulting triangle $A D E$ is equilateral, so $E D=E A=2$, the leg $E C=E D+D C=2+2=4$, since it lies in the right triangle $B C E$ opposite the angle $30^{\circ}$, then the hypotenuse $B E=8$, and the segment $A B=B E-E A=8-2=6$.

Answer: 6.