It is easy to see in Chapter XXXI how Tom and Becky could have gotten lost in the cave. At first they stayed with the rest of the company. Then the children began playing hide-and-seek. Naturally, Tom and Becky went off to hide by themselves. This began their separation from the group. They began exploring the fascinating features of the underground world,
...holding their candles aloft and reading the tangled web-work of names, dates, post-office addresses, and mottoes with which the rocky walls had been frescoed (in candle-smoke). Still drifting and talking, they scarcely noticed that they were now in a part of the cave whose walls were not frescoed.
The strange beauties of the cave have a hypnotic effect on these young children. Becky has implicit trust in Tom, and Tom is motivated to explore farther and farther because of his characteristic spirit of adventure, his "ambition to be a discoverer," and his belief that someday he is going to find a hidden treasure or something else equally marvelous. Mark Twain uses part of this chapter to describe the setting. For example:
Presently they came to a place where a little stream of water, trickling over a ledge and carrying a limestone sediment with it, had, in the slow-dragging ages, formed a laced ledge and ruffled Niagara in gleaming and imperishable stone....This shortly brought them to a bewitching spring, whose basin was incrusted with a frostwork of glittering crystals; it was in the midst of a cavern whose walls were supported by many fantastic pillars which had been formed by the joining of great stalactites and stalagmites together, the result of the ceaseless water-drip of centuries.
A stalactite is a formation that hangs from the cave roof and is gradually extended by the minerals in the dripping water. A stalagmite is a formation of mineral deposits that grows upward from the cave-floor.
What really gets these children lost and disoriented is running into the bats. There are thousands of them. They attack the children and force them to flee into the first corridor they come to.
The bats chased the children a good distance, but the fugitives plunged into every new passage that offered, and at last got rid of the perilous things.
Tom and Becky are afraid to go back the way they came because of the bats, so they explore other corridors at random. By this point they are hopelessly lost. As Tom tells Becky, he doesn't even know which way is north, or south, or east. It takes the two children a long time to realize the terrible predicament they are in. Tom tries to act confident, but Becky becomes more and more frightened and despairing. They lose all track of time as well as all sense of direction. Worst of all, they are gradually burning up their candles and facing the prospect of being lost in the absolute darkness of an enormous cave. Chapter XXXI leaves them feeling weary, hungry, "and sick with bodings of coming doom."