The person here is a synecdoche for the army he commands. AT: "Do not let his army join with our army against our enemies" (See: [[rc://en/ta/man/translate/figs-synecdoche]])
This rhetorical question can be translated as a statement. Here "taking the heads" is a metonym for killing. AT: "The best way for David to make peace with his master would be by killing our soldiers!" (See: [[rc://en/ta/man/translate/figs-rquestion]] and [[rc://en/ta/man/translate/figs-metonymy]])