Answer
$5.64J$
Work Step by Step
Let us assume that the weight acts at the center of the book i.e. 2 cm=0.02m from base.
Work needed to stack all 6 books one after another $=mg\times(0.02+0.06+0.10+0.14+0.18+0.22)=0.8\times9.8\times0.72=5.64J$