These two phrases mean basically the same thing and emphasize Solomon's desire for Yahweh to be present with the people. (See: [[rc://en/ta/man/translate/figs-doublet]])
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. AT: "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. AT: "live as he requires us to live" (See: [[rc://en/ta/man/translate/figs-idiom]])