She has to pay the price of the book.

Literal

She [topic-は] that book [genitive-の] price [object-を] must-pay.

~ねばならない is the more formal, slightly bookish counterpart to ~なければならない — a contraction descended from classical Japanese ね (negative) + ば (conditional) + ならない. It shows up most often in written Japanese, business correspondence, or stiff formal speech. 代金 ('price, cost, payment') refers specifically to money owed for goods or services received — distinct from 値段 (the listed price) or 料金 (a service fee or charge).