Here the word "hearts" represents the thoughts and desires. The idiom "set their hearts" means to determine to do something. Alternate translation: "those who had determined to seek Yahweh" (See: [[rc://en/ta/man/translate/figs-metonymy]] and [[rc://en/ta/man/translate/figs-idiom]])
Worshiping Yahweh is spoken of as if the person were seeking Yahweh. Alternate translation: "to worship Yahweh" (See: [[rc://en/ta/man/translate/figs-metaphor]])