In line with the Qur'anQur'an 2:220 ↗فِي ٱلدُّنۡيَا وَٱلۡأٓخِرَةِۗ وَيَسۡـَٔلُونَكَ عَنِ ٱلۡيَتَٰمَىٰۖ قُلۡ إِصۡلَاحٞ لَّهُمۡ خَيۡرٞۖ وَإِن تُخَالِطُوهُمۡ فَإِخۡوَٰنُكُمۡۚ وَٱللَّهُ يَعۡلَمُ ٱلۡمُفۡسِدَ مِنَ ٱلۡمُصۡلِحِۚ وَلَوۡ شَآءَ ٱللَّهُ لَأَعۡنَتَكُمۡۚ إِنَّ ٱللَّهَ عَزِيزٌ حَكِيمٞ
About this world and the next. And they ask you about orphans. Say, “Improvement for them is best. And if you intermix with them, then they are your brethren.” God knows the dishonest from the honest. Had God willed, He could have overburdened you. God is Mighty and Wise.
The verse says improving orphans' affairs is best, matching investing in property for the orphan nephews that later grew in value.
In line with the Qur'anQur'an 6:152 ↗وَلَا تَقۡرَبُواْ مَالَ ٱلۡيَتِيمِ إِلَّا بِٱلَّتِي هِيَ أَحۡسَنُ حَتَّىٰ يَبۡلُغَ أَشُدَّهُۥۚ وَأَوۡفُواْ ٱلۡكَيۡلَ وَٱلۡمِيزَانَ بِٱلۡقِسۡطِۖ لَا نُكَلِّفُ نَفۡسًا إِلَّا وُسۡعَهَاۖ وَإِذَا قُلۡتُمۡ فَٱعۡدِلُواْ وَلَوۡ كَانَ ذَا قُرۡبَىٰۖ وَبِعَهۡدِ ٱللَّهِ أَوۡفُواْۚ ذَٰلِكُمۡ وَصَّىٰكُم بِهِۦ لَعَلَّكُمۡ تَذَكَّرُونَ
And do not come near the property of the orphan, except with the best intentions, until he reaches maturity. And give full weight and full measure, equitably. We do not burden any soul beyond its capacity. And when you speak, be fair, even if it concerns a close relative. And fulfill your covenant with God. All this He has enjoined upon you, so that you may take heed.
The verse forbids approaching orphans' property except in the best way, matching his careful management of it.