Complex sentence: James Hartley (1745--1799), was a British officer in the service of the East India Company, whose service involved mainly wars against the Maratha Empire and against Tipu Sultan of the Kingdom of Mysore.
Split into simpler sentences: James Hartley (1745--1799) was a British officer in the service of the East India Company. His employment was mainly in the Company's wars against the Maratha Empire, and against Tipu Sultan of the Kingdom of Mysore.