As x → c f(x) gets smaller than 1 at some point and g(x) gets larger than 1 at some point.
(a) A number smaller than 1 raised to a power larger than 1 is even smaller then the small number, so the combination tends to zero.
(b) With g(x) tending to -infinity, you have the combination tending to 1/0 (i.e. tending to infinity).