The Librarian is losing, obviously.
Her domain of power(the library) can be physically identified and too small even when her power is huge (read that much books and memorize them all? heh). While our Keima's power is as great but unlimited in time and space (as long as there is modern civilizations where he can plug his comp and buy visual novels
).
Keima also have the advantage of knowing the opponent's weakness, certainly he already can see the ending