Generalizing to arbitrary trapezoids doesn't make things any more difficult, so we won't assume the trapezoid is isosceles or that it has height $1$. The key fact is that
$$
(ja)^2=\frac{a^2+(ka)^2}{2}.
$$
This can be seen by extending the lines $BA$ and $CD$ until they meet. (The case where the sides are parallel is trivial.) Call the meeting point $O$. Then triangles $BOC$, $EOF$, and $AOD$ are similar, which implies that their areas are equal to some proportionality constant multiplied by $a^2$, $(ja)^2$, and $(ka)^2$. The areas of trapezoids $BCFE$ and $EFDA$ are therefore proportional to $a^2-(ja)^2$ and $(ja)^2-(ka)^2$ with the same proportionality constant. Setting these equal gives the key fact. As a result,
$$
j=\sqrt{\frac{1+k^2}{2}}.
$$
To find $m$, use that the reduction in horizontal width is proportional to the height to get
$$
\frac{m}{h}=\frac{a-ja}{a-ka}=\frac{1-j}{1-k},
$$
with the result
$$
m=\frac{1-\sqrt{\frac{1+k^2}{2}}}{1-k}h.
$$
Historical aside: The key fact was known in Old Babylonian times (~2000 BCE– ~1600 BCE). As an example, it was used in the breathtakingly elegant solution to the problem on cuneiform tablet VAT 8512, which is explained in Jens Høyrup's book Algebra in Cuneiform: Introduction to an Old Babylonian Geometrical Technique. Problems given in Old Babylonian scribal education were generally contrived so as to have exact, finite representations in base-60 notation. Two whole-number "trapezoidal triples" $(a,ja,ka)$ are $(7,5,1)$ and $(17,13,7)$. The triple $(51,39,21)$ that appears on VAT 8512 is a multiple of the latter. If reconstructions of the damaged number at the top of the tablet are to be believed, IM 58045 from the Old Akkadian period (2400 BCE–2250 BCE) may provide an even older example of this triple and is, in fact, one of the oldest known mathematical tablets. Finally, note that trapezoidal triples are close cousins of Pythagorean triples: if $p^2+q^2=r^2$, then $(q+p)^2+(q-p)^2=2r^2$ so that the Pythagorean triple $(p,q,r)$ corresponds to the trapezoidal triple $(q+p,r,q-p)$. So $(3,4,5)$ corresponds to $(7,5,1)$ and $(5,12,13)$ corresponds to $(17,13,7)$.