My son, God love him, has become the most outspoken thing.
I have one of those - this is #3. I think they all sort of have this little attitude at this age. Finding their voice maybe?!?! Not sure, but the older 2 grew out of it.
When Nate gets real out of hand and mouthy we start taking things he loves most. Then its not going outside and to bed early. He hates having his fav things taken from him, and not being able to go outside. Plus he's not a fan of early bed time. Sometimes, honestly I just flat out ignore him when he starts the back talk or demanding. Eventually he will simmer down and decide that talking to me politely is the better way to go.
It must be a developmental thing for their age. My little mouthpiece will be 6 in Sept. She started the attitude in early spring. It's off and on and I put her toys in time out or, worse, make her take a nap. I love the nap punishment because I can take 1, too!