A= 2Lw + 2Lh + 2wh
keep the h-values on one side and move everything else to the other side.
A - 2Lw = 2Lh + 2wh
Take out 2h as a common factor on the rhs.
A - 2Lw = 2h(L + w)
divide both sides by 2(L + w).
(A - 2Lw)/{2(L + w)} = h
Answer: h = (A - 2Lw)/{2(L + w)}