Complex sentence: Dewey sets the locomotive into idle and leaves the moving cab to throw a misaligned rail switch, but as he does, the locomotive releases its independent brake shifts from idle to full power and begins moving down the track on its own.
Split into simpler sentences: Dewey sets the locomotive into idle and leaves the moving cab to throw a misaligned rail switch. But as he does, the locomotive releases its independent brake and shifts from idle to full power, and begins moving down the track on its own.