Pan might accept a musical trade, after a demonstration.
Find the book by W. Shakespear in the library of the old house.
Trade the book to the (bad) lute player.
Trade the lute to Pan for the flute.