She was answering HIS question. He escalated it.
The stop is justified and she is “required” to abide to lawful orders from the officer at that point (including putting out the cigarette). He was going to give her a warning and she started mouthing off to him. Did he handle it perfectly? Realistically, any of us who mouth off to a cop like that are going to get detained and probably drug down to the jail to cool our jets.
I’m not sure why he asked her to put out her cigarette, but that’s when everything went south. Then she refused to step out of her car. He was more than courteous up to that point.