Complex sentence: William Skyring commanded the "Beagle" on its voyage to Montevideo for repairs, and when it arrived there Robert FitzRoy was given command.
Split into simpler sentences: William Skyring commanded the "Beagle" on its voyage to Montevideo for repairs. When it arrived there Robert FitzRoy was given command.