Complex sentence: Ordered to kill Rey, Kylo instead kills Snoke and works together with Rey to kill Snoke's guards.
Split into simpler sentences: Ordered to kill Rey, Kylo instead kills Snoke. Rey and Kylo work together to kill Snoke's guards.