The word "they" may refer to Solomon's merchants. However this sentence is not about what the merchants did, but about where Solomon's horses came from. AT: "Horses were brought to Solomon from Egypt and from all the lands" or "Solomon's horses were from Egypt and all the lands"