In the sentence "His hobby is writing poetry," the phrase "writing poetry" is a gerund phrase. A gerund phrase is verb+ ing which functions as a noun. In the sentence, the phrase "writing poetry" is a noun acting as a complement of the subject.
His hobby = writing poetry. This means "writing poetry" complements the subject "His hobby".
The second alternative is correct (B).
"Gold in California ignited interest in a railroad to reach the West. However, Americans disagreed on where to build the railroad."
The use of the conjunction "however" in this context connects the two sentences with a contraposition, giving the exact meaning for the continuity of the text. In this way, it became clear that there was a need to build a railroad, but there was no unity among Americans about where to build the railroad.
1) A pickpocket stole his wallet
2) The scorching sun was unbearable
3) The crowded train screeched to a halt
Its to communicate with the enslaved people who are going to leave with her :)