The preposition "to" indicates a particular location or direction. For example:
"I went to the store." - indicates the location: "the store"
"Could you please give the book to him?" -indicates where/whom the action is directed: "him"
However, to in the example that you gave doesn't exactly function in that way.
"He was to live like them" - the "to" in "to live" is part of a kind of set phrase called an infinitive. The infinitive is the base form of a verb and the "to" can not be separated from its verb. "to live," "to be," "to play," "to eat," etc; All of these are the infinitive forms of their verbs. We use infinitives in numerous ways.
Such as to express intention:
"I will arrive at 8pm to get the letter."
It can also function as a noun and become the subject of a sentence (however, I feel this is often more literary):
"To murder is to kill a part of oneself as well."
Does this make sense? If you need me to provide more examples of what I explained, please let me know and I will be more than happy to do so. Good luck in your studies!