Your friend might have taken algebra or a high school course math during middle school or you it might’ve been you. Therefore the difference between you and your friends is that one of you is done with a requirement before the other and is most likely to have a “free” senior/junior year.