Thank you for your kind advice. Is it gratooitous, or do you expect to be paid for it?
Dick is speaking to a boy from the middle class who is attempting to get a job in the same shop where Dick's friend Henry is applying for work. The boy recognizes Dick as a bootblack. Dick, who is not ashamed of his work, is asserting that he and Henry have no intention of following the "advice" that they should go away. Dick's pronunciation of the word "gratuitous" is ironic. His vocabulary and wit are more than a match for the other boy, but at this point in the story Dick's education is still at an early stage, so he sometimes mispronounces words and uses street slang.
All my money's invested in the Erie Railroad.
Throughout the early part of the novel, Dick has no money. So when he claims that "all" his money is invested in Erie railroad stock, his listeners understand that the ragged bootblack speaking to them is joking, and that he has no money whatsoever. The statement, however, is not actually false.
Later on in the book, when Dick makes the wisecrack about Erie railroad stock while wearing a suit of clothes given to him by a wealthy mentor, he is taken seriously and a stockbroker attempts to talk him into trading the Erie stock for a different kind of mining investment.
The more Dick earns, the less he jokes about his imaginary stock in the Erie railroad, unless he is talking about something obviously out of his price range such as a dinner at an upscale restaurant.
You can, if you want to.
Dick is speaking to Jimmy Nolan, a fellow bootblack who is less industrious and less ambitious than Dick. A lazy boy, Jimmy often complains that he "can't" learn or improve himself. Yet the entire theme of the novel is that self-improvement is always possible for pepole who are willing to take the time and to put in the effort.
He felt that it was time to retire from business. He would leave his share of the public patronage to other boys less fortunate than himself.
Richard Hunter, having secured employment in a reputable business, no longer needs to work as a bootblack. He entertains the notion of persuading some of his customers to patronize Jimmy Nolan instead.