Hi L.,
How lucky your granddaughter is that you are there for her. My parents raised one of my nephews and I know it is difficult to try and be a parent instead of a grandparent to a child.
Consistency is the best policy. Even though things may be very confusing for your granddaughter you will have to have follow through with behavior. If she talks back and talking to her and asking what is wrong doesn't work then give her a time out. Some people say a time out goes with their age ie. age 3 a 3 min. time out. I have friends that say this works. I always gave time outs and said 'when you feel you can be nice please come join in again', sometimes only a matter of seconds and other times a half hour would go by but it gave them a choice. I didn't send my kids to their rooms as they have too many toys to play with there, generally I had them sit somewhere I could still see them but far enough away they had their own space. The main thing is the follow through, if they come back and continue the bad behavior then back to time out. For some kids it may take as much as 3 weeks of continuing their bad behavior and having time outs but once they really know you are going to follow through with not allowing it they will start to change their behavior. You may have some hysterical fits for a while but with your loving follow through it will change.
I know my parents had a standard of never speaking badly about my nephews mom. She basically abandoned him when he was 4 and would occasionally call or send a letter. These were the more difficult times for my nephew as he didn't understand why she didn't come to see him. My parents would explain that she wasn't in a good place in her life and she new leaving him with them was the best thing for him and had to be the hardest thing she ever did. There were a lot of other problems going on with her but they never told him that, just that she loved him and that her life was not place for kids right now. They raised him as their own, he is 27 now and is awesome. Loves his grandma as a mom.
Try and give your granddaughter choices, not big ones, but ones that give her a sense of control in her life with all the changes that are happening. Have her help cook, crack eggs, stir, measure, she can pick out her clothes for the day, help pick out the veggies and fruit when shopping, things that include her, let her make little decisions that make her feel apart of your home.
Are there any childrens activities that will allow her time with other kids her own age, a park, a preschool that would let her come a couple days a week....
It sounds like you already do this but let her know any time any where you are there to listen to her. Lots of hugs and love and lots of activity. If you live near the city. natural history museums and zoos are great activities for kids even 3, they get out and excercise and start associating being with you with having new fun things happen. If you live more rural then set up games in the yard or if you can have a pet, a cat that she picks out and is hers, she helps take care of, gives a name...gives her something to call her own. Also art projects are great ways for youngster to vent some frustrations, if you have a yard and can set up in the grass so you don't have to worry about a mess then let her go at it. May be able to vent some frustrations with art.
It sounds like she may still be visiting parents, in some ways it makes things more confusing for her. Since she is too young to write you may get an inexpensive tape recorder that she can record how she feels, she may want you to hear what she says or maybe keep it to herself but it could give her an outlet similar to a journal for her to express herself.
Also have her apologize when she says mean things. She may have learned some pretty bad habits while elsewhere and you are going to have to retrain some behaviors. Again a loving but committed follow through is the only thing that will allow her to eventually start behaving in a better way.
Good luck, stay positive, and give lots of encouragement and love!
SarahMM