The Facts on File Encyclopedia of Word and Phrase Origins (1997) has interesting entries for both bum and hobo. With regard to bum, it observes:
No self-respecting hobo, or tramp, would allow himself to be called a bum, for the word has degenerated from its original meaning of "a vagabond" over a century ago, and today usually stands for a "moneyless, prideless, filthy, hopeless derelict and habitual drunkard." One working definition to distinguish between the three classes of vagabonds is that "a hobo will work, a tramp won't, a bum can't." Bum was first recorded in 1855, and during the Civil War was used to describe a foraging soldier. It appears to derive from two words: the German bummer, "a high-spirited, irresponsible person," and the old English word bum, which has for four centuries been slang for both "a drunk" and "buttocks."
And as for hobo:
The word hobo is of uncertain origin. Perhaps it derives from a once common greeting of vagabonds to each other: "Ho! Bo" (Ho! a form of "Hi!" and Bo meaning "guy or brother"). This seems to be the most popular explanation, but wandering *ho*meward *bo*und Civil War veterans have also been suggested, as have hoe boys who left the farm and were on the road. The word is first recorded in the American Pacific Northwest, about 1889.
All I can say about the homeward bound Civil War soldiers is that they either were taking their time or got terribly lost if they started for home in 1865 (at the end of the war), and didn't get noticed as "hobos" until 1889 in the Pacific Northwest.
The Dictionary of American Slang, Third Edition (1995) adds this gloss:
hobo n b*y 1889* A person who wanders from place to place, typically by riding on freight trains and who may occasionally work but more often cadges sustenance...[origin unknown; perhaps fr the call "Ho, boy," used on late-1800s Western railroads by mail carriers, then altered and transferred to vagrants; perhaps putative hoe-boy, a migrant farm worker in the West, who became a hobo after the harvest season]