In elementary school, they were classmates in the next class and didn't know each other.
In junior high school, they were classmates, but they didn't have much contact with each other. They were just classmates.
In high school, they were classmates. They met because of someone.
University, they went to university in the same place, but from different schools. From then on, they lost contact.