How did the dynasties reunite?

Can you answer this question?