Let $x_1$ and $x_2$ be real positive numbers. The problem is to find all possible triples of $f$,$g_1$,$g_2$ such that $f(x_1 x_2) = g_1(x_1) g_2(x_2)$.
I suspect that the only one solution is $f(x_1 x_2) = (x_1 x_2)^n$, $g_1(x_1) = x_1^n$, $g_1(x_2) = x_2^n$ where $n$ is some power. But I can't provide the proof that there are no other solutions.
Note that $g(a)g(b) = f(ab) = g(1) g(ab)$ for every $a,b$. We could have $g(1) = 0$, in which case we have the trivial solution $f(x)=g(x) = 0$ for all $x$. Otherwise, $h(x) = g(x)/g(1)$ satisfies $h(a) h(b) = h(ab)$ and $h(1) = 1$. Thus $h$ is a homomorphism of the multiplicative group of positive reals into the nonzero complex numbers. Besides the solutions $h(x) = x^p$ (for arbitrary complex $p$), corresponding to $g(x) = C x^p$ and $f(x) = C^2 x^p$, there are exotic non-measurable solutions.