Source · the work in full

Rashi on the Prophets and Writings

CC BY · The Judaica Press Complete Tanach, trans. A. J. Rosenberg
Chapter 14

1 Chronicles 14

And Hiram the king of Tyre sent It is explained in Genesis Rabbah (85:4): “This man was accustomed to being friendly to the tribe of Judah; so was Hirah the Adullamite to Judah.
and masons and carpenters craftsmen.

And David knew that the Lord had established him as king when he saw that the kings of the nations sent him gifts.

and David took All this was David’s strength.

And the Philistines heard that David had been anointed king over all Israel, and all the Philistines went up because the Philistines had been ruling all the time until Saul and David came, as it is written (Jud. 15:11) concerning Samson: “Did you not know that the Philistines rule over us?” And likewise, (I Samuel 4:9): “Strengthen yourselves and become men, you Philistines, lest you serve the Hebrews, as they served you, etc.” Likewise, above in this portion (10:7): “And all the men of Israel saw, etc. and they abandoned their cities and fled, and the Philistines came and settled in them.” And in those seven years that David reigned in Hebron alone they did not say a word, and they were not concerned that David reigned over Hebron, because they said, “What do we care? Perhaps a governor or an officer appointed David over Hebron.” But when he was anointed king over all Israel, the Philistines all went up to seek David, for they did not want there to be a king in Israel, but that they should continue ruling over them.

And David inquired of God through the Urim and Tummim.

And they went up to Baal-Perazim which was later called Baal-Perazim because of the incident that occurred there. God has broken my enemies in my hand meaning that they fled and were broken off from one another.
like a breach of waters like waves of water that break from their place and fall somewhere else.

circle them The Divine Standard of Justice said to the Omnipresent, “Lord of the universe, why did You dismiss Saul for David?” [God] replied, “Because he did not wait seven days for Samuel as he had commanded him” [as in I Sam. 13:8–14]. The Holy One, blessed be He, said [further], “Now I shall test David: Circle them.” And David observed this.

You arrive at the cited line; the whole work is yours to read around it. The text is set from the cited public-domain edition.