Complex sentence: Steuart was captured along with his divisional commander "Allegheny" Johnson at the Battle of Spotsylvania Court House, and then exchanged in the summer of 1864, returning to a command in the Army of Northern Virginia for the remainder of the war.
Split into simpler sentences: Steuart was captured at the Battle of Spotsylvania Court House, and exchanged in the summer of 1864. He held a command in the Army of Northern Virginia for the remainder of the war.