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: 
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}$$
No it is not. Arithmetic mean gives you one equation. And there are two numbers to solve for. So there are infinite possibilities. For example, $$a=1,b=100$$ $$ a=0,b=101$$
They both have same A.M but widely different G.M