二人: Both (people). 高校: High school. 時代: age, period. 同級生: Classmate.
The first part, 二人は高校時代の同級生で, would be: "They both were classmates from high school".
互いに: Mutually. 訳有り Having special circumstances (e.g. problems, issues, advantages, flaws, defects, etc.). バツイチbeing once divorced; one-time divorcee. 同士 fellow, companion.
The trickiest bit in the second part, IMO, is the word 同士, that is used to group people having some trait in common, just like you would do with "fellow" in English. For example:
外国人同士 (fellow foreigners, it refers to 2 or more people whose trait in common is that they are foreigners).
学生同士 (fellow students, refers to 2 or more people whose trait in common is that they are students).
Putting all together, the second part of the sentence, 互いに訳有りのバツイチ同土, would mean:
Fellow divorcees, having mutually divorced once in the past.
All in all:
They both were classmates from high school and fellow divorcees, having mutually divorced once in the past.
Thank you for providing that explaination, It includes some quite interesting words.
Can someone explain me the meaning of this sentence?
二人は高校時代の同級生で互いに訳有りのバツイチ同土