Answer
$h=\dfrac{S-2lw}{2(w+l)}$
Work Step by Step
$S=2lw+2wh+2hl$ $,$ for $h$
Take all terms without $h$ to the left side:
$S-2lw=2wh+2hl$
Take out common factor $h$ from the right side:
$S-2lw=h(2w+2l)$
Take $2w+2l$ to divide the left side:
$\dfrac{S-2lw}{2w+2l}=h$
Rearrange:
$h=\dfrac{S-2lw}{2w+2l}$
Take out common factor $2$ from the denominator to show a better looking answer:
$h=\dfrac{S-2lw}{2(w+l)}$