All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
First of all, know that the issue of inheritance is a very serious and complicated one. Therefore, it cannot be solved through a Fatwa which is only an answer to a given question. It is unlawful to divide the inheritance before ensuring that there are no other inheritors, no debts, or others, such as a will. For these reasons, we advise you to put this in the hands of a legislative Islamic court, if available, as it is the only institution that could solve this problem in the best way.
However, in the given case, an eighth of the whole inheritance will be divided justly between two wives since the male child of the dead person is alive. Allah Says (what means): {But if you leave a child, then for them is an eighth of what you leave, after any bequest you [may have] made or debt.} [Quran 4: 12]
The mother will take a sixth of the inheritance because of the existence of the male child of the dead person. Allah Says (what means): {And for one's parents, to each one of them is a sixth of his estate if he left children.} [Quran 4: 11]
The remaining inheritance will be distributed among the children of the dead person. If there are only male children, the inheritance would be distributed equally among them. If there are male and female children, a male child's share would be equal to two female children's share. Allah Says (what means): {Allah instructs you concerning your children: for the male, what is equal to the share of two females.} [Quran 4: 11]
Allah knows best.