The original issue was whether the death penalty was better or worse, more or less humane, than imprisonment for life. It somehow got confused with solitary confinement, which had not previously been discussed at all. This was evidently because the lawyer could hardly agree to be imprisoned for the rest of his life, and the banker could hardly be expected to propose such a thing. It might mean keeping the lawyer locked up somewhere for as long as fifty years. He would have to be dead to win the bet. Meanwhile, the banker, a middle-aged man, would certainly have died. A dead man would be collecting from a dead man! So the original issue was never resolved from the very beginning. For plot purposes, Chekhov had to change the terms of the bet, without any explanation, into solitary confinement for fifteen years. That in itself seems questionable, since the banker had only specified a term of five years.
"It's not true! I'll bet you two million you wouldn't stay in solitary confinement for five years."
"If you mean that in earnest," said the young man, "I'll take the bet, but I would stay not five but fifteen years."
No one has been able to explain why the lawyer should have gratuitously added ten years to his ordeal. It was a big all-male party and no doubt a lot of vodka was being drunk. The quoted dialogue sounds as if the two men were showing off for the others and then were too proud to call the bet off when they were sober. The story opens the night before the fifteen years is up, and the banker himself is reflecting that the bet was senseless and proved nothing.
"What was the object of that bet? What is the good of that man's losing fifteen years of his life and my throwing away two million? Can it prove that the death penalty is better or worse than imprisonment for life? No, no. It was all nonsensical and meaningless."
Technically, the banker wins the bet because the lawyer deliberately loses it by leaving his confinement before the full fifteen years is up. Morally, the lawyer has won the bet because he could easily have remained imprisoned for a few more hours. However, he would never have collected the two million rubles because the banker intended to kill him. So the unforeseeable ending has the winner losing and the loser winning. And the issue for which the bet had been made is left unresolved.