Complex sentence: Khan had occupied Pune and terrorized the surrounding population for over three years, but within three days of Shivaji's visit, Khan left Pune.
Split into simpler sentences: Khan had occupied Pune and terrorized the surrounding population for over 3 years. Within 3 days of Shivaji's visit, Khan left Pune.