I think that some people who have replied are thinking that your daughter is in 5th grade, and her behavior at home has been rude and disrespectful since 3rd grade. But I think you're saying she is at a 5th grade comprehension level, but is chronologically a 3rd grader, and is in the 3rd grade, and the unacceptable behavior started only recently?
My inlaws live in a tiny town in Kansas - fewer than 200 people, most of them nearing 80. The town is dilapidated, nearly deserted and everyone knows everyone. We lived there for an extended period of time when my dh was aboard an aircraft carrier for a lengthy deployment. Because the town is so remote, we never were nearby, so we took that opportunity so my kids could get to know their grandparents. My son was enrolled in the little school.
There's a principal, but she doesn't have an office, she's also the 4th grade teacher. There is no support staff. Kids ride an unbelievably long time on buses to reach the school from their farms. My inlaws live near the "center" of town, which is an unpaved road lined with abandoned buildings, one little cafe, a cinder block building that serves as the general store, and a place that is part lumber yard, part tool store, and part place where all the farmers meet to talk about the price of wheat and what's got the cows all riled up, so my son walked to school alone. When my FIL drives to the post office (which is a steel shack with some post office slots in it), he leaves his truck running in the middle of the road, with the door open. Everybody does.
Clubs and playdates are almost unheard of. When the kids get to school, they've already put an hour or more in on their family's farm, doing chores. When the school day ends, they go home to sweep, rake, hoe, milk, feed animals, gather crops or eggs, combine, plow, babysit so their older siblings and parents can do the farm chores, or even drive tractors. I was amazed at how young the kids are when they learn to do the dangerous farm work. Sure, there are opportunities for social gatherings, but they're often centered around the family, like the family supper table. There are pot luck suppers, often held in some old building that everyone calls Grandma Sylvie's place, because back in the 1890s that's where Grandma Sylvie lived, even though Grandma Sylvie has been dead for 70 years and there's nothing left of her "place" and the building was put up long after she died. But if you ask where the pot luck supper is, they'll tell you "just go 'round the Jones' place until you get to Grandma Sylvie's place". Oh, thanks. (Then, when you can't find any Jones' place, you find out that the Jones family lived in a house that blew down in 1967, and they had moved away during World War 2 anyway). But that's life in a little farm community. (I ended up writing a short story about my year in a nearly extinct small Kansas town, and of my FIL's memories of life there when he was growing up; it was such a memorable experience for me, because I had never seen anything like this. It was simultaneously loving, embracing, tough, remote and removed, gritty, dusty and rusty, and beautiful.)
The nearest department store (like a Walmart) is 30 miles away. There are clubs, and church activities, but they can be an hour's drive each way, and often with snow, you can't get to them.
So I think I can understand a little of what you're experiencing.
This might be one instance where more computer time might be useful. Youthdigital.com and techrocket.com both offer great online classes for kids who want to learn design, computer coding, and all kinds of tech stuff. Yes, there's a reasonable fee, but kids attend class, do assignments, and are accountable for producing the work. There is support offered as well. Maybe your daughter would like something like that. If you google online classes for kids, you'll see lots of options. Since she's obviously intelligent, she might really flourish and be challenged in a setting like that.
But you, and not her teacher or an online school - will have to help her learn graciousness and empathy and kindness. God didn't make certain people slower because they need more love. God made an amazing array of humans and animals, all with different abilities, needs, gifts, and souls. Your daughter has a gifted intelligence, which is wonderful. But she also has a mean attitude, which is not. Some of those people who appear "slower" may possess the most tender heart and the most determined spirit that you can imagine. It's not that they need to be loved more - it's that your daughter needs to develop a spirit of respect, humility, helpfulness, encouragement, empathy, support, and appreciation for all of the differences she will encounter in her lifetime. Those kids whom your daughter regards as slower may actually have more to offer than she does. An intellect without a heart is a very lonely and often useless thing, although a heart with a limited intellect is never lonely or useless.
Some people will pop up with the correct answer to a difficult question in 2.3 seconds. Some will take hours to arrive at the answer, and they may need physical help in holding a pen or typing on a keyboard with laborious effort. Some may not get the correct answer, and some may not be able to comprehend the question at all. But that doesn't determine who needs love.
My daughter has a very high IQ. She can take a computer apart. Big deal. I can take a computer apart. Oh, but that's where the very significant difference comes in. If I were to take a computer apart, it would then only be useful as random ruined bits of scrap metal. My daughter can take a computer apart AND PUT IT BACK TOGETHER ONLY NOW ITS BETTER! She can replace graphics cards, power supplies and all kinds of weird things inside the computer so that it runs better and faster and quieter and does more stuff.
But she's "slow". She has multiple, serious, chronic medical diagnoses. She takes many medications, some of which alleviate some debilitating physical symptoms, but also can cause "brain fog" or cognitive sluggishness, as the Mayo Clinic doctors expressed it. But that's better than the pain or the suffering that she experiences without the medications. Her heart rate is controlled, pretty much, with medication, but it can race out of control for no reason (it's a neurological problem), and when that happens without warning she may stumble or fall or get very dizzy and almost appear drunk. Her fatigue is overwhelming, and she's usually in pain.
So I encourage you to find some ways to challenge your daughter's intellect, but mostly to help her develop a humble, loving heart. It's not about some people needing to be loved more. It's about some people needing to love more.