Here's why:
* Adverbs modify verbs, adjectives, or other adverbs. They tell us how, when, where, or to what extent something is done.
* Adjectives describe nouns or pronouns.
In this case, "neatly" describes how he arranged the books. It modifies the verb "arranged".