Compute the short base $B$ of the trapezoid
with $A=18$ and $H=6$,
knowing that the area of the triangle with base $B$ and height $K$ is $4/5$ of the trapezoid area (the triangle is formed by the short base and by the extensions of the legs).
Expliciting the relation between the areas we get:
$$\frac{B\times K}{2}=\frac{4}{5}\frac{H(A+B)}{2} \longrightarrow \left(K-\frac{24}{5}\right)B=\frac{432}{5}.$$
Notice that the big triangle (formed by the trapezoiod and by the upper small triangle) and the small triangle are similar since the two left angles adjacent to the basis are equal, same also for the two right angles. Then the following relation holds:
$$(H+K):A=K:B \longrightarrow K=\frac{-6B}{B-18}.$$
Plugging it into the first relation we get a quadratic equation in the variable $B$, which has the solutions $\pm 12$, so we conclude $B=12$.
Is there a more elementary way to solve the problem ? Just asking because it seems strange to me that this kind of problem leads to a quadratic equation, isn't it ?

The ratio of the areas of the small triangle to the large triangle is $\frac{4}{9}$. As these triangles are similar, their length ratios will be $\frac{\sqrt4}{\sqrt9} = \frac{2}{3}$. Hence the length of side $B = \frac{2}{3}\cdot 18 = 12$