both the person is a intersex (Intersex, in humans and other animals, is the presence of intermediate or atypical combinations of physical features that usually distinguish female from male
Through their maturity levels and their genitalia structure. Gender is determined by chromosomes A male has an X and a Y chromosome. a female has 2 X chromosomes