Solve the problem as follows:
Let the area of triangle ABE be X, the area of trapezoid EBCD be Y, the length of trapezoid upper bottom be Z, and the area of quadrilateral ABCD be S.
Because s = 8 * 12 = 96 (square centimeter)
So X+Y=96.
Because Y-X=40
So y = 68 (square centimeter)
Because (Z+ 12)*8/2=68.
So Z=5 (cm)