The agreement will be countersigned by Thiruvananthapuram MP Shashi Tharoor, who mediated between the school and the teens' families.
The two teenagers have been out of school for the last five months after the school suspended them for indiscipline - "a long hug in the school and intimate pictures in their private Instagram accounts".
"Our son has been permitted to take his exams, since classes for class XIIth are over. We will still challenge the High Court order in an appeal to expunge the extreme remarks against the teenagers in its judgment," the 17-year-old boy's father told NDTV.
The teenage boy had approached Child Rights Commission, which had ordered the school to take back the students. However, the school challenged the order in High Court. The court had stated that the school had the powers to decide on disciplinary issues.
Get the latest election news, live updates and election schedule for Lok Sabha Elections 2019 on ndtv.com/elections. Like us on Facebook or follow us on Twitter and Instagram for updates from each of the 543 parliamentary seats for the 2019 Indian general elections.