we have that
In the right triangle ABC
tan(30)=AB/AC -----> by opposite side divided by the adjacent side
so
AB=AC*tan(30)
Remember that
[tex]\tan (30^o)=\frac{\sqrt[\square]{3}}{3}[/tex]substitute
[tex]\begin{gathered} AB=6\cdot\frac{\sqrt[\square]{3}}{3} \\ AB=2\sqrt[\square]{3} \end{gathered}[/tex]