All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
First of all, the murder committed by a child is considered as a killing by mistake and not a deliberate killing, and the Diyah (blood money) for killing by mistake is incumbent on the family of the killer to be paid during three years according to the agreement of the scholars . The grandfather whom you mentioned is not responsible on his own for the Diyah of the killed child.
As regards the grandfather giving the house as a Diyah, then this is one of the two following cases:
1- It could be that he donated the house thinking that he was the only person who was obliged to pay the Diyah, then in this case, he was entitled to take back the house when he became aware that he was not obliged to pay the Diyah acting according to the statement of the jurists that “whoever thinks that he is indebted to a person and he pays the debt to that person and then it becomes obvious that there was no debt incurred by him, then he is allowed to take back the debt from the person who took it from him.” Therefore, the grandfather was allowed to take back the house because he had paid what he thought he was obliged to pay while he was not. Nonetheless, the father of the killed child has the right to ask the family of the killer to pay the Diyah. Besides, if the grandfather gifted the house to the wife of his son after he had taken it back, then it is her house and the heirs of the grandfather have no right to demand it.
2- If the grandfather knew that he was not obliged to pay the Diyah on his own, but he volunteered it and he gave the house instead of the Diyah and they reconciled on this, and both the grandfather and the heirs of the killed child were pleased [agreed] to take the house instead of the Diyah, then this is a reconciliation and the Prophet said: "Reconciliation is permissible between the Muslims except a reconciliation that forbids something lawful or makes permissible something that is prohibited.” [Ahmad, Abu Daawood and At-Tirmithi] If the reconciliation was concluded to take the house instead of the Diyah, then it was not permissible for the grandfather to breach this reconciliation because the ruling of reconciliation is like that of sale and there is no choice [to change one’s mind] after the meeting comes to an end. When the buyer and seller depart from each other, the sale becomes bondable, this is the same case with reconciliation, if the two parties of reconciliation depart from each other and their meeting comes to an end, and the reconciliation was concluded, then the reconciliation becomes incumbent on both of them and it is not permissible to breach it except with the agreement of the two parties. The Fiqh Encyclopedia reads: “The jurists said: The principle in this is that the reconciliation is one of the binding contracts, and for this reason, the two contracting parties have no right to invalidate it or to change their opinion after it has been concluded.” Hereupon, the house which you mentioned is considered as an inheritance for the heirs of the killed child and the heirs of the grandfather have no right in it and the wife of his son has no right in it as well. The grandfather writing the house in the name of one of his children is of no significance and paying the house as a dowry is of no significance as well because he disposed of something that he did not possess.
Therefore, the married son should give his wife a dowry equal to that of the woman of the same social status like her, as the jurists stated that if the named dowry is invalidated due to being unlawfully begotten and the like, then the wife is entitled to a dowry of the woman of the same social status like her.