“Why? There’s some mystery here. As a wise man you must make me understand.”

     “Will you promise to put me to death if I tell you?” asked the guru. The king gave him his solemn word. The guru took him aside, out of the servants’ earshot, and whispered to him, “Do you know why we want to die right now, the two of us? We’ve been all over the world but we’ve never found a city like this or a king like you. That stake is the stake of the god of justice. It’s new, it has never had a criminal on it. Whoever dies on it first will be reborn as the king of this country. And whoever goes next will be the future minister of this country. We’re sick of our ascetic life. It would be nice to enjoy ourselves as king and minister for a while. Now keep your word, My Lord, and put us to death. Me first, remember?”
Later the king sensed that there was some mystery behind the guru and his disciple. He was curious to learn more about it. As a result, he asked the wise man to clear his doubts. The guru urged the king to guarantee that he would be killed first if he revealed the secret behind why he wanted to be executed first.

The king promised the guruji that he would execute him first. The guru then took the king aside and explained that they had travelled the entire world but had never seen a city or a ruler like him. He went on to say that the stake they'd use to assassinate the disciple was the stake of justice. It had not yet murdered any criminals because it was so new.

Further, the guru said that the one who would die first on this stake would be reborn as the kingdom's king. The one who would die next would be reborn as the minister of the kingdom. The guru went on to say that he was tired of living like a sanyasi. He and his disciple aspired to be a king and a minister, respectively. As a result, he claimed that the king would execute him first to be reborn as a king, and then his disciple would be executed after him so that he might be reborn as a minister. By stating everything, the guru was trying to trap the king.
Meanings of the difficult words:
Mystery Something that is difficult or impossible to understand or explain
Solemn An agreement that you make in a serious way and expect to keep
Reborn To be born again
National Council of Educational Research and Training (2006). Moments. In the Kingdom of Fools– A K Ramanujan (pp. 19-24). Published at the Publication Division by the Secretary, National Council of Educational Research and Training, Sri Aurobindo Marg, New Delhi.