Conservative Force in a loop 
Could someone prove mathematically that why in this situation a charge could move in a loop with net work done.

Could someone explain this paragraph to me.
 A: You dont need math to understand this. When the electron is on the surface it gains kinetic energy due to the electric field (or equivalently, it transforms its electric potential energy into kinetic energy, like a mass falling in a gravitational field). At the edge of the rectangle you can slow it down and store or use this energy. Once inside the conductor you can move back the electron to its initial positions without any expense in energy because E=0 inside. Then repeat the loop and extract unlimited energy by looping as many times as you need.
This is as impossible as having a gravitational field in only one section of a room. If you had it, you could drop a ball, extract its kinetic energy once it is at the bottom, and then raise the ball again without spending energy because of the absence of the gravitational field on a different section of the room.
A: $\oint{E.dl} = 0$ for electrostatic field(The field is conservative).
For your the given configuration let the length of the rectangle element be $dx$.
If we assume the height to be infinitesimal,
$\oint{E.dl}$ = $\int{E_{||}.dx}$ + $\int0.dx$
$\oint{E.dl}$ = $\int{E_{||}.dx}$ which is clearly zero iff $E_{||} = 0$
