Ending months of legal wrangling over his grandmother’s influence, the agreement is hailed as a step toward a tentative reunion.