Complex sentence: The city was named after Kabul, Afghanistan, using an older English spelling of the name, in 1882: the British having just pulled out of Kabul at the end of the Second Anglo-Afghan War in 1881.
Split into simpler sentences: The city was named after Kabul, Afghanistan, using an older English spelling of the name, in 1882. The British had just pulled out of Kabul at the end of the Second Anglo-Afghan War in 1881.