She ____ well at school but that changed when she became friends with a different group of girls.

She ____ well at school but that changed when she became friends with a different group of girls.

Explanation

She had been doing well at school but that changed when she became friends with a different group of girls.

وہ اسکول میں اچھی کارکردگی کا مظاہرہ کر رہی تھی لیکن جب اس کی لڑکیوں کے ایک مختلف گروپ سے دوستی ہو گئی تو یہ بدل گیا۔

The sentence implies a continuous action that was ongoing in the past before it was interrupted or changed. "Had been doing" indicates this ongoing action.