Read the sentence. The Underground Railroad provided shelter and rest for slaves on their way to freedom in the north. What is the conjunction in the sentence ?

The answer is: and.
Conjunctions join words, phrases and clauses in a sentence in order to avoid multiple, short sentences. In the example sentence, the conjunction and links the words shelter and rest.
The rest of the alternatives are incorrect because, in this particular statement, they function as prepositions, which usually precede nouns or pronouns and express relations among words in a clause.