Complex sentence: He sided with British in 1799, acted as a secret agent on behalf of Pazhassi Rajah and after three years joined Pazhassi Raja to fight against British.
Split into simpler sentences: He sided with the British in 1799, had acted as a secret agent on behalf of Pazhassi Rajah. After three years he joined Pazhassi Raja to fight against British.