The first thing I note is that you definitely need to use grouping symbols. As you've written the problem, it would literally be interpreted as:
\(\displaystyle h-\dfrac{2}{h}-3=\dfrac{1}{-f}\)
I know that's not what you meant because the solution to that is a very very ugly expression that's not even close to the solution you posted. I'll assume that instead you meant (h-2)/(h-3)=1/-f or:
\(\displaystyle \dfrac{h-2}{h-3}=\dfrac{1}{-f}\)
That equation, solved for h does give the desired solution, namely:
\(\displaystyle h=\dfrac{2f+3}{f+1}\)
Now, that aside, you say you're unable to get the same answer as the website. That implies you've made (at least one) attempt at this problem. Please share with us any and all work you've done on this problem, even the parts that you know for sure are wrong. Thank you.