This is a quotation within a quotation. The entire quotation can be restated so that this portion is an indirect quotation: “the king said to sell this man and his family as slaves to pay his debt.” (See: [[rc://en/ta/man/translate/figs-quotesinquotes]])
It can be stated that the reason the man would be sold was so that the money received from selling him could pay part of what he owed to they king. (See: [[rc://en/ta/man/translate/figs-explicit]])