Developmental and social psychology

Two children with similarly active temperaments respond differently to the same classroom. One thrives because the teacher provides movement breaks and predictable routines; the other struggles in a highly restrictive setting. Which idea best explains these different outcomes?