Complex sentence: Shepard and the five dogs have a happy reunion, but before leaving, Max leads Jerry to the injured Maya, and is able to rescue her as well.
Split into simpler sentences: Shepard and the five dogs have a happy reunion. Before leaving, Max leads Jerry to the injured Maya, and he is able to rescue her as well.