Escape velocity is obtained by following relation
\(v_e=\sqrt{\frac{2GM_e}{R_e}}\)
This expression does not contain the mass m of the body, therefore escape velocity does not depend on the mass of the body. Therefore escape velocity for both will be same.
\(\therefore\) Escape energy \(E_{esc} = \frac{1}{2}mv_e^2\)
\(\therefore\) Escape energy of elephant will be very very greater than that of ant.