Just swim down when you are grabbed. If you kick and thrash to try to raise yourself to get your head above the water, they will feel you raising them up and try to climb on top of you for safety. So you shovel water with your arms to push yourself farther down, pulling them down just enough that their heads go underwater, too, and they'll release you quickly. They are struggling desperately to keep their heads above water and won't hang on to something that's pulling them under. Your head is already underwater, so it won't hurt you to go a little deeper, but if you panic and try to fight toward the surface, they might hold you under until it's too late for you. Go down.
Once they release, you push back out of reach, get your air at the surface, and figure out how to help them.