I was hoping someone could help me out with the following problem:

f(g(x))

f=(1+x)/2x

g=x/(3x+2)

I need to simplify that and find out the domain of the composite.

For the life of me I can't remember how exactly to work these two fractions together. I haven't done something like that in years, and the only thing that makes sense to me is to replace all the x's in g with f's equation, but then I get a mess of fractions. Still I went with it and got (x-1)/x, so the domain is all real numbers but 0, but I can't help but feel that something is wrong.