Given

f(x)= x x>0

and 1/x x<0

and

g(x)= e^x

compute the functions fg, gf.

I know how to do these kind of questions normally, but I'm not sure how to deal with the function f(x), when the value changes based on the value of x... Any words of advice?