She was on her way to school.

Literal

She [topic-は] school [direction-へ] go midway was.

~途中 ('on the way / midway through') is a useful noun for in-progress travel or activity — built from 途 ('road / route') + 中 ('middle'). The structure here is a relative clause: 学校へ行く ('go to school') modifies 途中 attributively, giving 'the on-the-way state of going to school.' へ marks the direction of motion (toward), with a slightly more directional/destination-emphasizing flavor than に in this slot. The past copula だった ('was') makes the whole thing a past description: she was in transit. This pattern (~る途中だ) is the standard way to say 'be in the middle of going to X.'