A man died and left behind two wives, five sons and a daughter, then the first wife and one of her sons died
Question

                A man died and left behind two wives. The first wife had two sons and the second had a daughter and three sons. Shortly after he died, the first wife and one of her two sons died, i.e., only one of the sons (from the first wife) is still alive, along with the second wife and her children. How is the estate to be divided in this case?.
Praise be to Allah.
    Firstly: 

    If a man died and left behind two wives, five sons and one 
    daughter, and he did not leave behind any heir other than these, i.e., he 
    had no father, no mother and no grandfather, then the two wives inherit 
    one-eighth, which is shared between them. Allaah says (interpretation of the 
    meaning): “but 
    if you leave a child, they get an eighth of that which you leave” 
    [al-Nisa’ 4:12]. 

    The rest is to be shared among the children, with the male 
    getting the share of two females; there is no difference between the 
    children of one wife and another. 

    In this case, the estate is to be divided into eight shares, 
    of which the two wives get one. The rest -- which is seven shares -- is to 
    be divided among the children. This may be done by dividing the estate into 
    176 parts, of which 22 go to the two wives, and the rest to the children. 

    So the share of each wife = the estate x (11 / 176) 

    The share of the daughter = the estate x (14 / 176) 

    The share of each male = the estate x (28 / 176). 

    Secondly: 

    If the first wife has died, her heirs inherit from her, and 
    they are her two sons, her father, her mother, and her grandmother, if they 
    are alive – and nothing goes to the children of the second wife.  

    Then if one of the sons of the first wife dies, his estate 
    goes to his heirs. So we have to see whether he had children and a wife or 
    not. If he did not, then his entire estate goes to his brother. 

    If the first wife died along with one of her sons at the same 
    moment, then this son does not inherit from his mother, and their estate 
    goes to their heirs: the estate of the wife goes to her living son and to 
    her father, mother or grandmother if they are alive. 

    The entire estate of the son goes to his brother -- if he did 
    not have a child or wife -- as stated above. 

    And Allaah knows best.