Deriving the formula for the height of a trapezoid The bases of a trapezoid have lengths $a$ and $b$, and its legs have lengths $c$ and $d$. A formula for the height is
\begin{equation*}
h = \frac{
\sqrt{(-a + b + c + d)(a - b + c + d)(a - b - c + d)(a - b + c - d)}
}
{2\vert a - b \vert} .
\end{equation*}
The formula is reminiscent of Heron's Formula.  I would like to see a derivation of it.

Your formula "is reminiscent of Heron's Formula" because it is based on Heron's Formula.
One formula for the area of a triangle is
$$A=\frac 12bh$$
and Heron's formula gives
$$A=\sqrt{s(s-a)(s-b)(s-c)}$$
where $s$ is the semiperimeter given by
$$s=\frac{a+b+c}2$$
Here is a diagram for the derivation for the height of your trapezoid, assuming that $a>b$ (i.e. $a$ is the larger base and $b$ is the smaller one).

Note that I constructed a line segment (in green) parallel to side $c$ through the end of side $b$ that is not on side $c$. This line segment also has length $c$, of course, and it makes a triangle with sides $a-b,\ c,\ d$ that has the same height $h$ (dotted) as the trapezoid.
Using those sides of the triangle rather than $a,\ b,\ c$ gives us the equations
$$A=\frac 12(a-b)h$$
and
$$A=\sqrt{s(s-[a-b])(s-c)(s-d)}$$
where
$$s=\frac{(a-b)+c+d}{2}$$
Solving for $h$ in $A=\frac 12(a-b)h$, substitutions, and simplifications give us
$$\begin{align}
h &= \frac{2}{a-b}A \\[2ex]
  &= \frac{2}{a-b}\sqrt{s(s-[a-b])(s-c)(s-c)} \\[2ex]
  &= \frac{2}{a-b}\sqrt{\frac{(a-b)+c+d}{2}\left(\frac{(a-b)+c+d}{2}-[a-b]\right)\left(\frac{(a-b)+c+d}{2}-c\right)\left(\frac{(a-b)+c+d}{2}-d\right)} \\[2ex]
  &= \frac{2}{a-b}\sqrt{\frac{a-b+c+d}{2}\left(\frac{-a+b+c+d}{2}\right)\left(\frac{a-b-c+d}{2}\right)\left(\frac{a-b+c-d}{2}\right)} \\[2ex]
  &= \frac{1}{2(a-b)}\sqrt{(a-b+c+d)(-a+b+c+d)(a-b-c+d)(a-b+c-d)} \\[2ex]
  &= \frac{\sqrt{(-a+b+c+d)(a-b+c+d)(a-b-c+d)(a-b+c-d)}}{2|a-b|} \\[2ex]
\end{align}$$
which is your formula.
It is easily seen that if we assume $a<b$ we end up with the same result, thanks to the absolute value in the denominator. If $a=b$ this formula fails, but we then get a parallelogram whose height is not uniquely determined, so no formula is possible for $a=b$.
I tested this formula in Geogebra, and it checks.
