Prove that $f(x)=0, \: \forall x \geq 0$, provided that $f(x+g(f(x)))=f(x)$ 
Let $f,g : [0, \infty) \to [0,\infty)$ be two continuous functions with $f(0)=g(0)=0$. Also, $g(x)\neq 0$ for all $x>0$ and $$f(x+g(f(x)))=f(x), \: \forall x \geq 0$$
  Prove that $f(x)=0, \: \forall x \geq 0$

I considered the function $h=g \circ f$ such that, applying $g$ on the given identity gives $$h(x+h(x))=h(x), \: \forall x \geq 0$$
Now, it is left to prove that $h(x)=0, \: \forall x \geq 0$, i.e. $h$ is constant. I tried to get the fact that $h$ is injective, and this would make it monotonic, but I'm not sure how to do that.
 A: Let $h(x)=x+g(f(x))$  Then of course $h(x)$ is continuous and we can write your functional equation as $$f(x)=f(h(x))$$
Suppose $x_0$ is such that $f(x_0)>0$.  Then $$g(f(x_0))>0 \implies x_0+g(f(x_0))>x_0 \quad  \& \quad f(x_0+g(f(x_0)))=f(x_0)$$
Since $h(x_0)>x_0$ and $h(0)=0$, by continuity, we can find $x_1$ such that $h(x_1)=x_0$.  But then $$0<x_1<x_0 \quad \& \quad f(x_1)=f(h(x_1))=f(x_0)$$  In a similar way we can construct a decreasing sequence of positive numbers $$x_0>x_1>x_2>x_3\cdots >0\quad \quad f(x_i)=f(x_0)\,\, \forall i$$
More broadly:  Let $S=\{x≥0\,|\,f(x)=f(x_0)\}$.  Let $L=\inf(S)$.  Then by continuity $f(L)=f(x_0)$  If $L>0$ then we can use the construction above to find $L_1$ with $0<L_1<L$ and $h(L_1)=h(L)$, but then $L_1 \in S$ which contradicts the definition of $L$.  Hence $L=0$ and $f(x_0)=0$ and we are done.
A: Lulu's answer is excellent, but I think I managed to get the result using the thinking I have started with.
We have the identity $$h(x+nh(x))=h(x), \: \forall x \geq 0 \text{ and } \: \forall n \in \mathbb{N}$$
Let us define $u_n(x)=x+nh(x)$. Then $$u_n(u_n(x))=u_n(x)+nh(u_n(x))=u_n(x)+nh(x)=u_n(x)+u_n(x)-x$$
so $u_n(u_n(x))=2u_n(x)-x$. From here it easily follows that $u_n$ is injective, hence monotonic, and since $u_n=x+u_n \circ u_n$ we get that $u_n$ is strictly increasing.
Let $a<b$. Then, for all $n$, we have $u_n(a)<u_n(b) \Rightarrow a+nh(a)<b+nh(b)$. Since this holds no matter how big $n$ is, we get that $h(a) \leq h(b)$, so $h$ is increasing, so it has a limit at $\infty$.
Suppose $\lim_{x \to \infty}h(x)=\infty$. Then, from $h(n+nh(x))=h(x)$, making $n \to \infty$ we get $h(x)=\infty$ which is a contradiction. So $\lim_{x \to \infty}h(x)=l \in \mathbb{R}$. 
If $l=0$, we are done. Suppose now that $l>0$ and suppose there is $x_0>0$ such that $h(x_0)>0$. From $h(x_0+nh(x_0))=h(x_0)$ it follows that $h(x_0)=l$. So consider the set $S=\{x \in [0,\infty] \mid h(x)=l \}$. Obviously, there is $c=\inf S$ and $h(c)=l>0$, so $c >0$. Now, if there is any $x \in (0,c)$ such that $h(x) \neq 0$, then $h(x)=l$, which contradicts the fact that $c = \inf S$. So $h(x)=0$ for all $x \in [0,c)$. But continuity implies $h(c)=0$ so $l=0$, contradiction.
Thus $h(x)=0, \: \forall x \geq 0$ so $g(f(x))=0$ and using the hypothesis we get $f(x)=0, \: \forall x \geq 0$. 
