Given data:
A class has 12 boys and 21 girls.
The GPA of the whole class is 2.96.
The GPA of the boys is 2.40.
to find the GPA of girls,
let x be the GPA of girls.
Then,
(12+21)(2.96) = 12(2.40) + 21x
33(2.96) = 28.8 + 21x
97.68 = 28.8 + 21x
68.88 = 21x
x = 68.88/21
x = 3.28.