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.
You can use the A.M. - G.M. inequality which is as follows-
$$\frac{x\_1+x\_2+\cdots+x\_n}{n}\ge\sqrt[\large n]{x\_1\cdot x\_2\cdots x\_n}$$