Set the origin at the bottom of the tank with the vertical axis passing from the bottom thru the center
Let x be distance from this axis to the side of the tank noting that it forms the radius of a circle
Let r be the radius of the tank thus r2=x2+(r-h)2. Solve to yield for x2=2rh-h2 .
Note that pix2=area of a circle at height h and ρgπx2dh=dw (w = weight of the differential element).
Substituting yields dw= ρgπ(2rh-h2)dh
Note that dw must be lifted 5+r-h meters thus dE=(5+r-h)dw
Integrate dE from h=0 to h=2r to find the energy required to empty the tank ignoring the small amount that remains in the pipe above the tank at h=2r and h=2r+5