Work is defined as Force * Distance .... in this case imagine infinitesmally thin disks of water being lifted up over the edge of the pool. Each disk will have a weight (dm) = ρgπ(102)/4dh where h varies from 0 to 4 m. The distance each disc will be lifted 4-h with h=0 at bottom. The allows us to write Work = ρgπ(102)/4∫(4-h)dh (h from 0 to 3.5) for part a). (6.16E6 joules).
for part b note that each disc will be lifted 5+1 = 5 meters for a total of work to be 3.85E5 joules