The average height of the 15 boys was 165 cm, so the total height of the 15 boys is:
H(boys) = 15 * 165 = 2475 cm
Let's call the number of girls 'n'.
So, if the average height of the girls is 155 cm, the total height of the girls is:
H(girls) = n * 155 = 155n cm
Then, when we have boys and girls together, the total number of people is '15 + n', and the average is 158 cm, so the total height is:
H(boys and girls) = (15 + n) * 158 = 2370 + 158n
Now, summing the total height of boys and the total height of girls, we have the total height:
H(boys and girls) = H(boys) + H(girls)
2370 + 158n = 2475 + 155n
158n - 155n = 2475 - 2370
3n = 105
n = 35
So we have that the number of girls in the group is 35.