This is an event that happened during the battle. This can be stated clearly. Alternate translation: "During the battle, Absalom happened to meet some of David's soldiers" (See: [[rc://en/ta/man/translate/figs-explicit]])
Absalom had long hair that got caught in the tree branches. Alternate translation: "his hair was caught in the tree branches" (See: [[rc://en/ta/man/translate/figs-metonymy]])