Rav Sternbuch (1:783):Question: In the case of a couple getting divorced, who gets the custody of the children? Answer: It would seem that according to Torah law it depends upon what is best for the children. Kesubos (102b) states that the daughter typically goes to the mother – because that is best for her as is explained in Rema (E.H. 82:7). The son typically goes to the father after the age of six as is explained in the Be’er haGolah. That is because the father teaches his son Torah and provides him with guidance. Consequently it is typically best for the son to be with the father. However beis din always must decide what is best for the children as is stated in a responsa ascribed to the Ramban (#38) as well as the Radvaz which is cited in Pischei Teshuva (2:7). Look at Rambam and Ravad (Hilchos Ishus 21:13) whether a son should go to his father when he is less then six when he has already taught him Torah. Also see Noda B’Yehua (E.H. #89), that if they are not in the same city then the son should be with the father even when he is less than six. In modern times since yeshivos are readily available, there are times when it is best for the mother to have custody to educate her son and to send him to yeshiva and he will be as well educated as if the husband had custody. See Rashdam (E.H. 123), that it is obvious that everything is done for the good of the education of the children. And today there are excellent schools also for girls. The main point is to judge what is the best place for the education of the children and their welfare. Therefore in the present case, I advised that for the time being that the custody be reversed so that the son goes to his mother because she will supervise him and send him to an excellent yeshiva. Whereas the daughter should go to the father who will watch her since she has grown some and wants to be with him and he will supervise her. This is according to the Chelkos Mechokek (2:10) that in the case where the daughter says she prefers the father that it is to her benefit and her wishes should be complied with. This is also the view of the Maharshdam we mentioned before – that everything depends on what is good for her. We have also decided that in another year, there were will be a new evaluation to decide what arranged is in their best interest.