This is a good problem!
First of all, you can show that the triangles adjacent to the parallel sides are similar. This can be done using the rule for alternate interior angles when a line intersects two parallel lines, and the rule for opposite angles when two lines intersect. This is an important fact that will be used later in the problem. See if you can prove this to yourself.
Now for the fun...
I can't draw the trapezoid here, but let's do the following:
1. Let a be the length of the top parallel side and let b the length of the bottom parallel side
2. Draw the diagonals as described in the problem.
3. From the intersection of the diagonals, draw a perpendicular line segment to each of the two parallel sides.
4. Let j be the length of the line we just drew to the top side, and let k be the length of the line we drew to the bottom side k.
Now, what is the area of the trapezoid? It's 1/2 (a + b)h, where h is the height of the trapezoid. But h = j + k, right? So the area of the trapezoid is 1/2 (a + b)(j + k). Let's simplify that by multiplying out the terms. It becomes aj/2 + ak/2 + bj/2 + bk/2.
Now, let's go back to the two triangles that we showed to be similar. We don't necessarily know which is which, but let's just assume that the one on the top is the smaller one. By the formula for the area of a triangle, it's area is 1/2 aj, or aj/2. And we know that's 2. And similarly the area of the bottom triangle is bk/2, which we know is 18. So we can plug these numbers into the expression for the area of the trapezoid, and we get 2 + 18 + ak/2 + bj/2 = 20 + 1/2 (ak + bj).
Now comes a trick. We know that the ratio of the area of the two triangles is 18:2 or 9:1. And we also know that the ratio of the areas of two similar triangles is equal to the square of the ratios of any two corresponding sides, or the ratios of the height. So the ratio of the base of the large triangle (b) to the base of the small triangle (a) is 3:1. So b = 3a. And similarly, the ratio of the height of the large triangle (k) to the height of the small triangle (j) is 3:1. So k = 3j.
So the area of the trapezoid is:
20 + 1/2 (ak + bj) =
20 + 1/2 (a*3j + 3a*j) =
20 + 1/2 (3aj + 3aj) =
20 + 1/2 (6aj) =
20 + 6 * 1/2 * aj
But 1/2 aj is the area of the top triangle, which is equal to 2.
So this becomes:
20 + 6 * 2 = 20 + 12 = 32