Let $ABCD$ be a trapezoid with $AB$ and $CD$ parallel, $\angle D = 2 \angle B$, $AD = 5$, and $CD = 2$. Find the length of $AB$.

Let's think step by step and output the final answer within \boxed{}.
user