The order of attacks is determined by Hero mobility, Level, and number of skills.  Pei  can buff the speed of his whole team, Pegasus gets a speed boost every turn.