At first we were separate, but one day we started going to and from school together.

Literal

First [topic-は] separate was [but-ですが] one-day together coming-going do [become-like-ようになりました].

A nostalgic sentence about a growing routine. 別々 (べつべつ) is the reduplicated form of 別 ('different, separate') and means 'each separately,' 'apart.' The ~ようになる ('come to do X,' 'start doing X') pattern marks the transition into a new habit — the two people began a shared routine. 行き帰り ('going and returning,' 'coming and going') is a compound noun from the verb stems of 行く and 帰る, often used for the round trip to and from a regular destination like school or work. Note the の of 一緒に is omitted in spoken/casual rendering: 一緒行き帰りする. The polite ~ました ending sets the register at gentle recollection.