The answer is B. the man's hat.
If you go to the passage where Holmes is talking about how he solved the case, you will find openly stated that Holmes discovered multiple things from the hat. The man did not go out much. The man had foresight. Etc...