Question: Can we give an example to show that the measurability of the set $f^{-1}(\{a\})$ for every a does not imply that $f$ is a measurable function?

Answer: 
Unfortunately the AM-GM inequality is the best you can do. If your data is $\{x,\frac{1}{x}\}$ the geometric mean will be $1$, yet you can make your arithmetic mean any value in $[1,+\infty)$ by choosing $x$ large enough.
For an arithmetic mean $a$ and for a geometric mean $g$, we can see

1. $\sqrt{x\cdot y}=a \leftrightarrow x\cdot y=a^2$
2. $\frac{x+y}{2}=b \leftrightarrow x+y=2b \leftrightarrow y=2b-x$

Substituting (2) into (1) we get

$$x\cdot(2b-x)=a^2 \leftrightarrow -x^2+2bx-a^2=0 \leftrightarrow x=-\frac{4b^2\pm\sqrt{4b^2-4a^2}}{2}$$

Thus not even a calculation of gm from am is possible, but for every positive $(a;b)$ am, gm pair we can find the $(x,y)$ real number pair, whose am and gm are the given values!