A person lifts a book and places it on a shelf. In which case is work done, and why?

Work is done when the person lifts the book because force is applied to move the book over a distance against gravity.