Complex sentence: He was given command of the Neapolitan army which was to co-operate with Piedmont against the Austrians, but when he reached Bologna the king, who had already changed his mind, recalled him and his troops.
Split into simpler sentences: He was given command of the Neapolitan army, which was to co-operate with Piedmont against the Austrians. However, when he reached Bologna, the king, who had already changed his mind, recalled him and his troops.