All perfect praise be to Allah the Lord of the Worlds. May His peace and blessings be upon our Prophet Mohammad and upon all his family and companions.
Once the orphan reaches puberty, his/her property must be delivered to him/her and none has the right to dispose of it save with his/her permission. This is because Allah the Almighty says {What means}: " Try well the orphans until they reach the age of marrying; then, if you perceive in them maturity, deliver their property to them; consume it not wastefully and in haste, lest they should grow up. If any man is rich, let him be abstinent; if he is poor, let him consume honourably. And when you deliver to them their property, take witnesses over them. God suffices as a reckoner." {An-Nisaa`, 6}.
If the situation is as reflected in the above question, then all the sums raised in favor of the orphans are theirs and must be delivered to them at the onset of puberty and it isn`t permissible for anyone to dispose of that property. Since the grandfather has built flats to his grandparents then they are theirs, and he should have registered them in their names because they are their right. In addition, the guardian`s disposal of the orphan`s wealth must meet the best interest of the latter. AL-Demiati says: "The guardian must act in the best interest of those under his guardianship." The evidence on this is that Allah says {What means}: "And that you do not approach the property of the orphan save with that, which is fairer, until he is of age. And give full measure and full weight, in justice. We do not charge any soul beyond its capacity. And if you speak, then be just, even if he should be a kinsman. And fulfil God's covenant. This is what He has charged you with that perhaps you will remember." {Al-An`am, 152}. He also says {What means}: " on this world and the Hereafter. They will ask you about orphans. Say: 'To set their affairs aright; and if you intermix with them, they are your brothers; God knows well him who works corruption from him who sets aright; and had He willed He would have harassed you. Surely God is Mighty, Wise'." {Al-Baqara, 220}. {E`anat at-Talibeen, V.3:86}.
However, taking the fact that the grandfather has passed away, then his heirs, to clear themselves from liability, must rush to register the flat in the name of the orphans, to the exception of the roof on which it was built since the latter is part of inheritance. In addition, the guardians mentioned in the above question must deliver the remaining portion of the raised money (5000 $) to the orphans since it is theirs. And Allah the Almighty knows best.