Sentence:  [H]e would pat the children on the head when he saw them on the stairs, and <WSD>ingratiate</WSD> himself with them as far as he dared. 
Meaning of the word marked with <WSD> tags:  To bring oneself into favour with someone by flattering or trying to please him or her.