Complex sentence: A vast number of Muslim refugees from Shaanxi fled to Gansu, formed the "Eighteen Great Batallions" in eastern Gansu, intending to fight back to their homes in Shaanxi.
Split into simpler sentences: A vast number of Muslim refugees from Shaanxi fled to Gansu. Some of them formed the "Eighteen Great Batallions" in eastern Gansu, intending to fight back to their homes in Shaanxi.