Here is a more direct geometric way to solve this, without using coordinates.
Since $DC$ is parallel to $AB$ and $BC$ is perpendicular to both, $ABCD$ is a right trapezium with right angles at $B$ and $C$. Drop a perpendicular from $D$ down to side $AB$, meeting it at point $E$. Since $DC$ is parallel to $AB$ and $BC$ is already perpendicular to both, the figure $BCDE$ is a rectangle: $BE = CD = 3$ cm and $DE = BC = 2$ cm.
Now look at triangle $ADE$. Since $E$ lies on $AB$ between $A$ and $B$ (because $AB$ is longer than $CD$), $AE = AB - BE = AB - 3$. The angle $\angle DAE$ is the same as $\angle DAB = 45^{\circ}$, since $E$ sits on segment $AB$.
Triangle $ADE$ has a right angle at $E$, because $DE$ is perpendicular to $AB$, being a side of rectangle $BCDE$. With a right angle at $E$ and an acute angle of $45^{\circ}$ at $A$, the third angle at $D$ must also be $45^{\circ}$. This makes triangle $ADE$ an isosceles right triangle, so its two legs are equal: $AE = DE$.
Since $DE = 2$ cm, the height of the trapezium, we get $AE = 2$ cm as well.
Let's summarize:
So $AB = 5$ cm, confirming option (A), and matching the coordinate-based calculation using a completely different, purely geometric route.