Hello Tarabas,
You might want to look through your textbook in the parts that talk about the energy stored in an electrostatic field. By that I mean the total energy it takes to create a given electrostatic field in the first place.
To point you in the right direction, the energy
density (energy per unit volume) of an electrostatic field is
\frac{dU}{dV} = \frac{1}{2} \varepsilon_0 |E|^2
where dU is the differential potential energy (the potential energy of the space enclosed within the differential volume), dV here refers to the differential volume (where 'V' here stands for
volume, not to be confused with potential or voltage) and E is the magnitude of the electric field at that point in space. Really though, you should check your textbook because it's likely there are at least a few pages dedicated to this idea.
Now do you see how the answer you posted in the image is integrating the energy density over the specified volume?

[Edit: which gives you the energy stored in that region of space between R and 2R]