The students who were good at studying were helping the other students in the class.
Literal
Study [gen-の] can-do students [topic-は], class [gen-の] other students [obj-を] were-helping (polite).
A classic が → の conversion in a relative clause: 勉強ができる生徒 ('students who can do studies') has が → の inside the modifier, giving 勉強のできる生徒. This substitution is optional and slightly more literary than straight が, often used to smooth out nested particles in prenominal clauses.