Complex sentence: He participated in the Third Anglo-Ashanti War of 1873 to 1874 and, having graduated from the Royal Military Academy Sandhurst in 1874, in the Second Anglo-Afghan War of 1878 to 1880.
Split into simpler sentences: He participated in the Third Anglo-Ashanti War of 1873 to 1874, then attended and graduated from the Royal Military College, Sandhurst. He next saw active service in the Second Anglo-Afghan War of 1878 to 1880.