What does the narrator mean by “a moment of temporary mental apparition”?
Sam and Bill are obviously swindlers, confidence men, who specialize in cheating simple rustic people out of their money with various schemes. Both men have cultivated big vocabularies in order to impress the yokels. They are similar in this respect to the two rapscallions in Mark Twain's The Adventures of Huckleberry Finn who call themselves The King and The Duke but who are really only ignorant petty crooks. Both Sam and Bill use big words inappropriately. These are called "malapropisms." What Sam the narrator is trying to say is that Bill expressed the idea of kidnapping a child "during a moment of temporary aberration." Part of O. Henry's reason for portraying these two would-be kidnappers as men who are not as smart as they think they are is to explain how they could have made so many mistakes and gotten themselves into so much trouble.
In Hollywood parlance "The Ransom of Red Chief" would be called "a busted caper story." There have been many films in which crooks plan a crime (a "caper") carefully but things start going wrong because of unforeseen circumstances. An excellent example of a "busted caper" film is Fargo (1996), starring William H. Macy as the man who hires a couple of incompetents to kidnap his wife so that he can collect a million dollars in ransom from her wealthy father.
According to Wikipedia:
The word malapropism comes ultimately from the French mal à propos meaning "inappropriate" via "Mrs. Malaprop", a character in the Richard Brinsley Sheridan comedy The Rivals (1775) who habitually misused her words.
In addition to malapropisms, there are other misuses of language in the story. For example, Sam says:
There was a sylvan attitude of somnolent sleepiness pervading that section of the external outward surface of Alabama that lay exposed to my view.
The words "somnolent" and "sleepiness" mean the same thing, as do "external" and "outward."
A large part of the comedy in O. Henry's "The Ransom of Red Chief" comes from the fact that the kidnap victim's father, whom they take to be an ignorant country bumpkin, outsmarts the two city slickers. This sort of theme has been a staple of American humor for many years.
In my opinion, what the author is trying to do here is to be funny and to give us some insight into the two guys who are going to try and kidnap "Red Chief."
The word "apparition" makes absolutely no sense in this context. An apparition is something like a vision or a hallucination -- something that you see that probably isn't really there. When the narrator quotes Bill Driscoll as saying this, he is showing that both he and Bill are not really all that educated and are probably not as smart as they think they are.
In this story, we will find out just how dumb the two criminals really are, and I think that the author is hinting at that in this passage.