Isolate the f. Note the equal sign. What you do to one side, you do to the other.
First, subtract 6e from both sides
6e (-6e) - 7f = 8g + h (-6e)
-7f = 8g + h - 6e
Divide -7 from both sides
(-7f)/-7 = (8g + h - 6e)/-7
f = -8/7g + h/-7 + 6/7e
f = -8/7g + h/-7 + 6/7e is your answer
hope this helps