There is no “reset.” You’re assuming that the five-year student will not acquire an even higher level of math, say a seventh year equivalent like discrete math (assuming these students we’re talking about are even that interested in math) or that the non-repeat is starting in a lower level of math.
At BS, not all ninth graders are taking the same level of courses. For example, a repeat might have only completed geometry at the previous school when his/her non-repeat peer might be entering ninth grade in calculus (there are lots of those at BS). Or an incoming ninth-grader (repeat or no) might have completed Algebra II at the previous school, but is placed in the new school’s Algebra II course because the school has assessed that the student is not ready for pre-calc in their curriculum. All BS students start where their incoming skills place them and finish where their skills and interests take them and none are disadvantaged in the college application game. (And no BS student is able to hide repeat status and would have no incentive to do so.)
This may be why boarding schools mostly refer to grades using British terminology (9th grade = third form or “preps,” “lowers,” “uppers,” etc.), so it doesn’t appear so odd to have students from multiple forms in any given class. And most of the BS discussed here will be able to support and challenge a student as far as they are capable of going in any subject area, regardless of where they started.