We are given $\displaystyle f(x) = \dfrac{3x -1}{x +1}$ and $\displaystyle g(x) = 2x + 1$. We need to find function $\displaystyle h(x)$, if this is true: $\displaystyle f(g(x)) = g(h(x))$. How can I find this function $\displaystyle h(x)$?

I figure it out that $\displaystyle f(g(x)) = \dfrac{6x + 2}{2x + 2}$, but I don't know how it goes next step?