f[x_] := Exp[x^2]
DSolve[D[f[x] g[x], x] == f'[x] g'[x], g[x], x] // Simplify
{{g[x] -> E^(-(1/2) + x) Sqrt[-1 + 2 x] C[1]}}
Since E^(-(1/2)+x) can be rewritten as e^-(1/2) e^x , the e^-(1/2) can be included within the arbitrary constant and the solution is
g = C_1 e^x Sqrt[2x-1]