Praise be to Allah.
The basic principle is that if the spouses have joint finances, if one of them dies, his share is to be divided among his heirs only.
So if the husband dies in this case, his share of the joint wealth is to be divided between his wife and his son only, and his wife’s sons from her former husband do not inherit from him.
If he made a bequest saying that they should have a share like that of his son, this is a bequest of more than one third, which is not allowed. Moreover, execution of this bequest depends on the agreement of the heirs. The son who is his heir may refuse to give his brothers more than one third.
In al-Mawsoo‘ah al-Fiqhiyyah (43/274) it says:
The basic principle with regard to bequests is that it is not permissible to give more than one third of the wealth, if there is an heir; if the bequest is for more than one third of the wealth, then whatever is surplus to one third depends on the agreement of the other heirs. If they agree to it, then the bequest is permissible, but if they do not agree to it, anything more than one third is rendered invalid. End quote.
The evidence for that is the report narrated by al-Bukhaari (5659) and Muslim (1628) from ‘Aa’ishah bint Sa‘d, according to which her father said: I fell sick in Makkah and was very ill. The Prophet (blessings and peace of Allah be upon him) came to visit me, and I said: O Prophet of Allah, I am leaving behind some wealth, and I am leaving behind only one daughter, so can I bequeath two thirds of my wealth and leave one third? He said: “No.” I said: Then can I bequeath half and leave half? He said: “No.” I said: Then can I bequeath one third and leave two thirds to her? He said: “One third, and one third is a lot.”
The way to achieve what you want to do for your two sons is by doing two things:
1. For each of you to have your own, separate wealth. There is nothing wrong with you continuing to share your wealth, on the basis that each of you knows how much is his, then if you die, your children will all inherit from you equally.
If your husband dies, only his son will inherit from him, but he can make a bequest leaving one third or less of his wealth to your two sons.
2. For you to share out the wealth that you have, or a part of it, between the three children, as a gift, on condition that the children take possession of it in a real sense, by putting the money in an account that belongs to the boy, or for it to be taken by a guardian of his. Thus the wealth will be divided equally between them.
In al-Mawsoo‘ah al-Fiqhiyyah (42/125) it says: The fuqaha’ stipulated that the recipient of a gift should be competent and fit to possess what is given to him.
If the recipient is an adult of sound mind, then he may take possession of the gift. However, if he is not competent to take possession of it, then giving a gift to him is valid, but it must be taken on his behalf by someone who is competent to take possession of it, such as a guardian and the like. End quote.
And Allah knows best.