"The Bet" illustrates the irony of situation. How is the banker's situation at the end of fifteen years different from what he had expected? What do we learn about the lawyer that makes his position ironic as well?
The banker was so rich fifteen years before that betting two million rubles was relatively insignificant. In fact, he probably offered to bet that sum of money in order to show off his wealth to all the important men who were gathered at his home for his party. Note that he says:
"Gentlemen, I stake two million!"
He wanted to impress all of them. His guests were important men, including "journalists and intellectual men," but none of them could have produced two million rubles. He expected his wealth to increase, because he had more than he could spend and there would be an almost effortless accumulation of capital through compound interest--that is, interest on interest, and so on. But a lot can happen in fifteen years--as we in America have seen since the housing bubble burst around 2007 and the dot.com bubble burst shortly before. Besides that, the banker was growing old and losing the confidence that is characteristic of youth. And furthermore, he didn't expect to lose the money; he didn't believe the lawyer could stick it out for fifteen years.
At supper he made fun of the young man, and said: "Think better of it, young man, while there is still time. To me two million is a trifle, but you are losing three or four of the best years of your life. I say three or four, because you won't stay longer."
It is ironic that the two million comes to mean so much to the now elderly and insecure banker while it has come to mean nothing to the lawyer after fifteen years of solitude and study. He does not realize that he is doing such a great favor to the banker, because he would have no way of knowing that his jailer had been losing money steadily for all that time.
The lawyer really coveted those two million rubles fifteen years earlier. He was willing to sacrifice his freedom for a significant portion of his life in order to get his hands on that fortune. What he didn't realize that his solitude would change him into a person who was indifferent, not so much to the money, but to the things that the money would represent. He might have become arrogant and greedy like the banker. The money had remained important to be banker even as his capital was dwindling, because the man had no inner resources. He had only materialistic values.
Chekhov is suggesting in his story that spiritual values are far more important than materialistic values. At the end of the story, the prisoner leaves a note for the banker in which he says:
"You have lost your reason and taken the wrong path. You have taken lies for truth, and hideousness for beauty. You would marvel if, owing to strange events of some sorts, frogs and lizards suddenly grew on apple and orange trees instead of fruit, or if roses began to smell like a sweating horse; so I marvel at you who exchange heaven for earth. I don't understand you."
The banker has had his freedom for fifteen years and it hasn't done him any good. The lawyer has lost his freedom for the same fifteen years and it has given him unexpected spiritual enlightenment rather than worldly wealth. It is extremely ironic that a man should endure fifteen years of solitary confinement and then walk out of his prison five hours before the term was up.