Remark You have been just a little bit ambiguous in your notation, those answering cannot be sure what you mean. A small hint. Certain mods will delete these sorts of questions. I can't get the latex to work properly.
Condition 1 If you mean y = 8/(x^2 + 4) then f(x) = 8/x g(x) = (x^2 + 4)
Condition two If you mean y = (8/x^2) + 4 Then f(x) = 8x + 4 g(x) = 1/ x^2