A library is selling books to raise money. All paperbacks cost the same amount, and all hardcover books cost the same amount. If one person buys 5 paperback books and 4 hardcover books and spends $124.91, and another person buys 3 paperback books and 2 hardcover books and spends $66.95, how much does each type of book cost?