Part A = 3062 J
Start by calculating the total mass for the books on a shelf. Since each shelf holds 29 books and each book is 1.4 kg, that gives a mass of 40.6 kg/shelf.
Now we can calculate the work required to fill each shelf. The work in this case just equals the energy done to move the books.
U = mgh
W = mgh
Now since the average book has a height of 22 cm, its center of mass is 11 cm above the base of the shelf. So 11 cm must be added to the height of each shelf. This gives the starting shelf a height of (0.11 + 0.15 = 0.26) 0.26 m. This is because the books were lying flat and have to be raised upright. So continue:
U = mgh
U = 71 * 9.8 * (0.26 + 0.57 + 0.88 + 1.19 + 1.5)
U = 71 * 9.8 * (4.4)
U = 3061.52 J