Complex sentence: In a series of battles, Marthanda Varma annexed the kingdoms of Attingal and Quilon, whenMarthanda Varma realised that the Rajah of Kayamkulam was involved in certain conspiracies against him, he started a military campaign againstKayamkulam to incorporate it into Travancore.
Split into simpler sentences: In a series of battles, Marthanda Varma annexed the kingdoms of Attingal and Quilon. On the pretext that the Rajah of Kayamkulam was involved in certain conspiracies against him, Marthanda Varma started a military campaign againstKayamkulam to incorporate that kingdom too into Travancore.