You can put this solution on YOUR website! Assume it is, (brackets help clarify things)
make h the subject
multiply by 2h, get rid of the annoying fraction
2hS = wd(h-d)
2hS = wdh - wd^2
2hS - wdh = -wd^2
factor out h
h(2S - wd) = -wd^2
h = -
You can put this solution on YOUR website! You got 2 different solutions, both of which are correct, because your entry is ambiguous.
=======
Use parentheses. They're free.