That should be on the left.

Think of g(x) as being a variable itself rather than a function:What do I have to do next?

Thanks for the help!

f(g)= g+ 1/g= 3x+1. Now solve for g. Multiplying both sides by g gives , a quadratic equation. Use the quadratic formula to solve for all x.