。
Study hard so you don't fail.
Literal
Fail-not-so-as-to hard-ly study.
~ないように expresses a negative purpose ('so that X doesn't happen'). 一生懸命 is a productive adjectival/adverbial meaning 'with all one's might / desperately,' literally 'fighting for one life' — etymologically from samurai protecting their fiefs. 落第する means 'to fail (a test/grade).'