You only understand the meaning of this Bible passage when you see that Solomon not just killed a few of his and his father’s opponents, but that he does justice. Because God wants justice. The whole Bible makes it clear to us that God does not allow injustice. If someone is innocently put to death, that blood must be avenged. After the first murder in the Bible, we read that the blood of the murdered one cries out from the earth to God (Genesis 4:10). That is not some primitive thinking about the soul of the murdered one who is going to take revenge, but it indicates that God sees injustice and wants justice to be done by retribution.
33 So shall their blood come back on the head of Joab and on the head of his descendants forever. But for David and for his descendants and for his house and for his throne there shall be peace from the LORD forevermore.”