For example
$$f(x)=2f(\frac{x}{2})$$
implies $f(x)=cx$ under what condition? For example, is continuity required for $f(x)$,$g(x)$,$h(x)$ all or some of them?
Obviously, we can construct $f(\frac{x}{2})=\frac{f(x)}{2}$ starting from some value at $f(1)$. However, if the function does not behave nicely around $1$, this may create a hectic behavior around $0$ too.
If we set, for example, continuity as required is there any restriction over $g(x)$ or $h(x)$, apart from those obvious, when $g(x)$ or $h(x)$ are not defined somewhere, which is acceptable?
Are all other solutions necessarily not continuous functions?
Another example $f(x)=\ln(f(e^x))$ apart from obvious requirement that $f(x)$ is not negative, has a solution $f(x)=x$ and... is there any other comparable?
Suppose $g(h(x))=x$, for all $x\in\mathbb{R}$, and suppose $h(x)$ is not of the form $cx$, for some $c\in \mathbb{R}$.
Then lettting $f=h$, we get $$g(f(h(x))) = g(h(h(x))) = h(x) = f(x)$$ so $f$ satisfies the specified identity, but $f(x)$ is not of the form $cx$, where $c\in\mathbb{R}$.
More generally, if $k$ is any function such that $k\circ h=h\circ k$, then letting $f=h\circ k$, we get $$g(f(h(x))) = g(h(k(h(x))))=k(h(x))=h(k(x))= f(x)$$
In particular, to satisfy the identity $$f(x)=\ln(f(e^x))$$ with a function other than $f(x)=x$, you can take $f(x)$ to be any of $$\ln(x),\;\;\;\ln(\ln(x)),\;\;\;\ln(\ln(\ln(x))),\;\;.\;\;.\;\;.$$