A trapezium has parallel sides of length equal to $a$ and $b$ ($a <b$), and the distance between the parallel sides is the altitude $h$. The extensions of the non-parallel lines intersect at a point that is a vertex of two triangles that have as sides the parallel sides of the trapezium. Express the areas of the triangles as functions of $a,b$ and $h$.
1. Let the trapezium have parallel sides of lengths \(a\) and \(b\) with \(a < b\), and the distance between the parallel sides is the altitude \(h\). The extensions of the non-parallel sides intersect at a point \(X\).

2. Let the height of the smaller triangle with base \(a\) be \(y\). By the property of similar triangles, we have:
   \[
   \frac{a}{b} = \frac{y}{y + h}
   \]
   Solving for \(y\):
   \[
   \frac{a}{b} = \frac{y}{y + h} \implies a(y + h) = by \implies ay + ah = by \implies ah = by - ay \implies ah = y(b - a) \implies y = \frac{ah}{b - a}
   \]

3. The area of the smaller triangle with base \(a\) and height \(y\) is:
   \[
   \text{Area of smaller triangle} = \frac{1}{2} \times a \times y = \frac{1}{2} \times a \times \frac{ah}{b - a} = \frac{a^2 h}{2(b - a)}
   \]

4. The height of the larger triangle with base \(b\) is \(y + h\). Using the value of \(y\) from step 2:
   \[
   y + h = \frac{ah}{b - a} + h = \frac{ah + h(b - a)}{b - a} = \frac{ah + hb - ha}{b - a} = \frac{hb}{b - a}
   \]

5. The area of the larger triangle with base \(b\) and height \(y + h\) is:
   \[
   \text{Area of larger triangle} = \frac{1}{2} \times b \times (y + h) = \frac{1}{2} \times b \times \frac{hb}{b - a} = \frac{b^2 h}{2(b - a)}
   \]

Conclusion:
\[
\boxed{\text{Area of smaller triangle} = \frac{a^2 h}{2(b - a)}}
\]
\[
\boxed{\text{Area of larger triangle} = \frac{b^2 h}{2(b - a)}}
\]