Step 1: Set up coordinates using the right angle.
Since \(BC\) is perpendicular to both parallel sides \(AB\) and \(DC\), place \(B\) at the origin \((0,0)\) and let \(AB\) lie along the x-axis. Since \(BC=2\) cm and \(BC\) is vertical, \(C = (0,2)\).
Let \(AB = a\), so \(A = (a, 0)\), with \(A\) to the right of \(B\) since \(AB\) is a side of the trapezium.
Step 2: Place D using CD.
Since \(DC\) is parallel to \(AB\), both horizontal, and \(CD = 3\) cm, \(D\) is 3 units away from \(C\) along the horizontal direction: \(D = (3, 2)\), keeping \(ABCD\) in the correct order around the trapezium.
Step 3: Use the angle condition at A.
\(\angle DAB = 45^{\circ}\) is the angle at vertex \(A\) between rays \(AB\) and \(AD\).
The direction from \(A\) to \(B\) is \((0,0)-(a,0) = (-a, 0)\), pointing in the negative x-direction.
The direction from \(A\) to \(D\) is \((3,2)-(a,0) = (3-a, 2)\).
Using the cosine of the angle between these two directions:
\[
\cos 45^{\circ} = \frac{(-1)(3-a) + 0 \times 2}{\sqrt{(3-a)^2+2^2}} = \frac{a-3}{\sqrt{(3-a)^2+4}}
\]
Step 4: Solve for a.
Since \(\cos 45^{\circ} = \frac{1}{\sqrt2}\), and \(AB\) must be longer than \(CD\) here (so \(a > 3\), making \(a-3\) positive), let \(u = a-3\):
\[
\frac{u}{\sqrt{u^2+4}} = \frac{1}{\sqrt2}
\]
Squaring both sides:
\[
\frac{u^2}{u^2+4} = \frac{1}{2} \implies 2u^2 = u^2+4 \implies u^2 = 4 \implies u = 2
\]
taking the positive root since \(u=a-3>0\).
Step 5: Find AB.
\(u = a - 3 = 2 \implies a = 5\). So \(AB = 5\) cm.
Step 6: Why the other options are wrong.
Option (D), 2 cm, would make \(AB\) shorter than \(CD\), which contradicts the 45 degree angle opening outward from A over a height of 2 cm. Options (B) and (C), 4 cm and 3 cm, come from arithmetic slips, such as forgetting to square the equation correctly or mixing up \(BC\) and \(CD\) in the formula. Only \(a=5\) satisfies the equation exactly.
Final Answer:
\[ \boxed{AB = 5 \text{ cm}} \]