Here their "hearts" refer to the people's desires and emotions. Desiring to please someone is spoken of as inclining the heart toward that person. Alternate translation: "make us want to please him" (See: [[rc://en/ta/man/translate/figs-metonymy]] and [[rc://en/ta/man/translate/figs-metaphor]])
Here "in his ways" is an idiom that refers to the way he wants people to live. Alternate translation: "live as he requires us to live" (See: [[rc://en/ta/man/translate/figs-idiom]])