The Bodhisatta was once a king’s advisor. The full account of this lifetime is told in the Maha-Ummagga Jataka (#546) while the Khajjopanaka Jataka only relates this single incident from that story.
After four of King Vedeha’s advisors framed the Bodhisatta for stealing from the king, he fled to save his life. The goddess that lived in the royal parasol missed hearing the Bodhisatta preach and wanted him back. So one night she asked King Vedeha four riddles about who is dearer than a husband, and he took them to his four advisors. They had no idea. The next night the goddess returned and the king said he couldn’t solve the riddles. She rebuked the king’s foolishness for relying on Senaka, his chief advisor, and the other three advisors and said only the Bodhisatta was smart enough to figure them out. “When you want fire, you don’t blow on a firefly. Putting fireflies under grass and cow dung will not make them burn,” the goddess said. “And when you want milk, squeeze a cow’s utter, not its horn. To know something’s weigh, use a balance, not your hand. Senaka is a firefly; the Bodhisatta is a great fire blazing with wisdom. If you do not bring him back to the palace to answer these questions, you are a dead man.”
In the Lifetime of the Buddha
One day some of the Buddha’s disciples were discussing his supreme wisdom. In particular, how he had humbled and converted a vast multitude of brahmins, ascetics, thieves, goblins, gods, and more. When the Buddha heard them talking about it, he told them this story so they knew he’d had perfect knowledge in the past too.
King Vedeha was an earlier birth of Laludayi, an elder disciple of the Buddha who was so shy that he could not speak when around more than a single other person, and he often said one thing when he meant another. Senaka was an earlier birth of Saccaka, a Jain who converted to be a disciple of the Buddha, and the other three advisors were Potthapada, Ambattha, and Pilotika, three ascetics who respected the Buddha.