No need to be terrorized for the last few weeks of school. And since there isn't time for your daughter to totally reprogram the offender, I'd actually step in for a confidential talk with teacher. In general a 5th grader should handle her own battles, but again, there isn't really time and your daughter is loathing school and the year is almost up.
If you're certain your daughter's claims are pretty much true, then go to the teacher and play the totally diplomatic and non-accusatory card (especially if the kid may be a pet). Start with some compliments and get the teacher's guard down.
"Hi, Ms ____, how are you doing so close to end of year? My daughter has really loved having you for a teacher, especially_____(specific sincere reasons). We are having one issue though and I'm hoping you can help since it's so late in year and I'm not sure how to have my daughter handle it herself. Apparently sitting near _____is causing some problems for my daughter to the point where she is dreading coming to school. I'm not trying to accuse anyone of anything as I'm not there to witness, but regardless of who is at fault, I'd like my daughter to be moved to a different seat far from ____. I don't want any drama over it, just a seat change."
The teacher is either going to be compassionate and helpful and ask what the trouble is, at which point KEEP THE NEUTRAL TONE like, "Well my daughter says_____is happening, but I'm sure there are two sides to the story, but regardless, I'm not satisfied with having her spend the remainder of the year dealing with this if a simple seat change can be had."
If she gets defensive or ugly or refuses to comply, then I guess your daughter will have to learn that some people are just jerks, students and teachers alike, and she'll survive the year and it will all be in the past soon enough.
Depending on your daughter's personality, you could ask her if she would like you to do this and that you'll promise to tell the teacher not to make an issue of it with the girl, just change the seats with no further drama. Your daughter will probably be terrified the girl will hate her even more for tattling unless you can convince her you can keep it sly.
As for actually asking the teacher to handle the mean girl, that depends a lot on personality of teacher and relationship to possible pet etc. You'll have to judge that one...it may be easier to try to just move them apart.