The point of a punishment is to teach them what's unacceptable, and to show them that life is more miserable for them if they incur a consequence. If you think she's learned that lesson in 12 days instead of 14, you can show her the value of negotiation. You might let her trade for something else that helps you, as someone suggested below (a chore, for example). That doesn't mean - and you should be clear - that she can continue to tell you to shut up or stuff it and then sweep the floor to make it all okay. You are negotiating the length of the punishment only. So if you agree to let her go, make sure that she knows you aren't caving in, but rather that you feel it might have been too long to begin with (if you want to raise that issue) or, more importantly, that she seems truly apologetic. It's a good way to teach her other ways to handle frustration - ask her to brainstorm a different way in which she could have handled the situation. Don't rehash what she did wrong - just have her play out a better way to handle it, something she could have said that didn't disrespect you. Then hug her and say she's growing up, and you're rewarding her with the sleepover. Make it contingent on no more outbursts or disrespect. I do think 2 weeks might be a little long for a 10 year old. If she had hit you or destroyed property, that would be more serious. I don't like the insults, mind you - and I didn't put up with it from my son either. But grounding and other punishments have to fit the offense and not be so extreme that they just cause more resentment. It's a balancing act.
Sometimes parents don't make good tutors. It's not just that it's adding on another new relationship between parent and child, although that can be a problem. It's also that parents aren't always so good at certain school subjects. Parents who aren't strong in math may not explain it well. Parents who don't write, punctuate or spell well shouldn't be overseeing the English homework. And so on.
By 10, your daughter should be able to go to her teacher for extra help. It may also make sense to get an tutor - someone objective, a new face, with a new way of explaining the same thing. Your daughter might find (and should be encouraged) that she has more ability than she thinks, but that she just needs to hear the info explained differently or maybe try a few practice problems in a different format from her regular homework. That can make all the difference.