Why did Bil'am see fit to mention the fact that Balak was the king of Mo'av?
Rashi: He was hinting that, although he was not important in Hashm's eyes, he was important in the eyes of kings. 1
Rashi on Koheles, 10:13: He ought to have answered 'Hashem, You know who they are!' - but he answered conceitedly ... .
Rashi writes that Bil'am hinted 'even though I am not important in Your eyes, I am important in the eyes of kings.' This is lunacy! What is a mortal king compared to Hashem?! Would one tell his friend 'you do not esteem me, but the cat esteems me!'?
Zichron Tzvi (in Lev Eliyahu Shemos p.276): This shows how the Midos of pride and seeking honor can make a person a lunatic, to say so to Hashem!
Hagahah (in Lev Eliyahu Shemos p.276): Bil'am did not intend to hint so to Hashem; the verse reveals what was in his heart. 1
Hagahah, citing R. Y. L. Chasman: Similarly, when Hashem asked Shlomo what he wants, and he requested Chachmah, why was Hashem so impressed? Obviously this is more important that long life, wealth and victory in war! Hashem did not talk with Shlomo; rather, He saw in his heart that he valued Chachmah, and the other things were not important to him