The probability of selecting one girl from the group is

where

is the number of girls in the group. Without replacing her, the probability of selecting another girl from the group would be

. Assuming selection is independent, this means

There are two solutions here,

and

. The number of girls in the group must be positive, so there must be 5 girls in the group.