You got headlocked on the ground. You try to put in the frame, and do the Frame Escape, the Headlock Escape 1 technique. The problem is, you were too late! You didn't put the frame in time, and they got their head down, right on yours, bearing their weight down.
So in this case, we use Headlock Escape 2 - Leg Hook Escape. Tuck your inner arm's elbow in, with the outer arm, hug around their shoulder. Then take your top leg, and hook it around their posted leg. You are going to push up and around off of your BOTTOM leg's foot! That is the key. As you climb over and around, they will still be committed to the headlock, and because of that, they will be rolling over as you make your way over and around. You end up in a modified mount, with a headlock.
The fact that they still have a headlock on you is NOT A PROBLEM! You are on top, that's the most important thing. We have several episodes devoted to the Headlock Counter. That's what applies here, so we are not worried about the fact that they still have a headlock on us. What we are changing is our position, from being on the bottom, to being on top.
The elbow tuck, the hug, and the leg hook are all positions we put into place. The main action comes from the bottom leg/foot pushing you up and over them.
Follow me for more Martial Arts Instruction on social media:
Twitter - @AustinKungFu
Instagram - @AustinKungFuAcademy
Facebook - Facebook.com/AustinKungFuAcademy