Initially, just before release, the system has potential energy $U$: $$T=U=mgL$$ As the string hits the horizontal bar, it enters into a different 'orbit', this one with radius $L-H$. At the highest point of this loop, the mass is at height $2(L-H)$. Assuming full conservation of energy, then the new total energy is: $$T=2mg(H-L)+K$$ Where $K$ is the kinetic energy at the top of the loop. So: $$mgL=2mg(H-L)+K$$ So that: $$K=mg(3L-2H)$$ With $v$ the tangential velocity at the top of the loop: $$K=\frac12 mv^2=mg(3L-2H)$$ So: $$v^2=2g(3L-2H)$$ The centripetal force $F_c$ is: $$F_c=\frac{mv^2}{R}=\frac{mv^2}{L-H}$$ For there not to tension in the string at the top of the loop: $$mg=\frac{mv^2}{L-H}$$ $$g=\frac{2g(3L-2H)}{L-H}$$ So I get: $$L-H=2(3L-2H)$$ $$H=\frac53 L$$