。
She studied her heart out and passed the exam.
Literal
She [topic-は] with-all-one's-might studied-and exam [for-に] passed.
一生懸命 (いっしょうけんめい) is a treasured idiom literally meaning 'risking one's whole life,' used as an adverbial intensifier for 'with all one's might / desperately, wholeheartedly.' Its variant 一所懸命 (いっしょけんめい) is older and still occasionally used. The phrase originally came from samurai contexts — defending one's family domain (一所) at all costs, with one's life at stake. In modern usage it's the standard way to describe doing anything earnestly, from cleaning to studying to playing sports. パスする is a loanword verb (English 'pass' + する) — informal compared to 合格する.