A very intriguing series of clues ties the two identities of Neville St. Clair and Hugh Boone together, with aid from St. Clair himself and his wife Mrs. St. Clair. First, Holmes learns that there were blood drops on the window sill where Mrs. St Clair had seen her husband on Swandam Lane, as well as blood drops on the beggar's, Hugh Boone's, shirt sleeve, which he explained away by indicating "his ring-finger, which had been cut near the nail" (629).
Second, Holmes learns from Mrs. St. Clair that she has received a letter from her husband saying that all will be well written by his hand (handwriting) but posted by another person as the address was written in a different hand. Third, Mrs. St. Clair tells Holmes that on the morning that was the last time she has seen of her husband, he cut his finger: "On the very day that I saw him last he cut himself in the bedroom" (632).
Holmes next questions Mrs. St. Clair as to what precisely she had seen when she was shocked to see her husband in Swandam Lane looking out a window above an opium den. She said that upon seeing her, her husband uttered a cry that she took to be a call for help; Holmes suggested might be a cry of surprise. She said he suddenly vanished from the window, which she said was an act of violence by someone pulling him in; Holmes suggested he might have leapt back from surprise. She said he had his regular clothes on but his collar was off and his shirt open at the throat (men's collars in the 1800s were stiff and were constructed to be attached and detached), to which Holmes made no reply, only asking if St. Clair had ever shown signs of opium use.
After thought while "sitting upon five pillows" (637), he and Watson made a predawn journey to the jail to see Hugh Boone. Remembering that Holmes is described by Doyle in many of his stories and novels as a master of disguise, note that Holmes took with him a bath sponge from the bathroom.
Holmes' reasoning went something like this:
If what Mrs. St. Clair saw could be interpreted as surprise and avoidance; if St. Clair never showed any signs of opium use; if pennies in the pockets were weighing down the coat found by police; if she received a letter from her husband stating he was alive and well; if both Hugh Boone and Neville St. Clair had a cut on their fingers; if Boone attributed the blood on the window sill to his having stood three; if Mrs. St. Clair attribute the blood on the window sill to St. Clair having stood there; if St. Clair's clothes found in Boone's room showed no signs of violence having been done, then...with the art of disguise, both men must be one and the same person for some reason associated with pennies and not opium. Hence, Holmes' journey to the jail with a washing sponge in tow to give the very dirty prisoner, one Hugh Boone, a good scrubbing to reveal the missing Neville St. Clair.
Ta da! Deductive logic wins again! Incidentally, what is amazing is that not only does Holmes unravel puzzles of logic and logical sequence, but Sir Arthur Conan Doyle contrived and meticulously built up the puzzels for Holmes to unravel!