。
She had to study hard to catch up with her classmates.
Literal
She [topic-は] with-all-one's-might studied-and class [genitive-の] people [with-に] catch-up-must-do.
The everyday counterpart of the same idea — ~なければならない is the standard, neutral 'must do' construction, far more common in speech and writing than the formal ~ねばならない. The phrase 追いつかなければならない literally builds 'if not catch up, then no good' — a double-negative way of expressing necessity that's typical of how Japanese encodes obligation. Casual speech often shortens it further to ~なきゃ or ~なくちゃ.