In 2 Nephi 17:2 the “house of David” refers to King Ahaz, a descendant of King David and heir to the throne of the kingdom of Judah.
Confederate means to make an alliance with. Syria had formed an alliance with Ephraim, the northern kingdom of Israel.
The phrase “heart was moved” shows that Ahaz and his people were afraid when they learned that Syria and Ephraim were allies.