Usually Ue is electrical potential energy and V is voltage. The equation is W = qΔV = ΔU. Since, we want the work of the field, it is the negative of the Work required against the field.
The V expression is obtained from dV = dq/(4πε0r) (Coulomb's law) where r is the distance from the dq to the point on the z axis of interest.z = 0 to z=2R (z is coordinate along OP)
The dq is is Q/(2πR) Rdθ and r =sqrt(R2+ z2) so V = Q/(4πεsqrt(R2+z2)) + C (or keQ/sqrt(R2+x2) + C
The result means that the voltage is equivalent to that from a point charge sqrt(R2+z2) away
You only care about the difference in V so the W = -q(V(2R)-V(0)) = -(keQq/R)(1/sqrt(2) - 1) (Constant of integration cancels). Work is positive as the field act s to push the charge upwards.
Please consider a tutor. Take care.