Original: Both the adopted sons were educated at the palace as it was the custom those days for the people of Royal families.
Simplified: Both the adopted sons were educated at the palace.