Complex sentence: Then they first fought the Ansar and Qureish Muslims (battle of the trench), then converted to Islam and after this, int the muslim army, defeated the bani Hilal and then Hawazin in the Battle of Hunayn.
Split into simpler sentences: Then they first fought the Ansar and Qureish Muslims (battle of the trench), then converted to Islam. Included in the muslim army, they defeated the bani Hilal and the Hawazin tribes in the Battle of Hunayn.