Complex sentence: His motivation was to curry favour with the Tang court, and probably also to obtain more troops for his subsequent campaigns to defeat what he saw as the enormous threat presented by the northeastern "babarians", amongst whom the Khitan were the most significant.
Split into simpler sentences: His motivation was to curry favour with the Tang court and probably also to obtain more troops. He needed these for his subsequent campaigns to defeat what he saw as the enormous threat presented by the northeastern "babarians" amongst who the Khitan were the most significant.