First, it's important to acknowledge those big transitions she's going through! If there are no other siblings in between (and even if there are), a new baby is, from your daughter's perspective, somewhere between a mixed blessing and a major catastophe. All of a sudden, she has to share her parents' love and attention with this puny little kid who can't even do anything fun. In fact, the baby seems to get lots of caring and attention for crying and being helpless. Well, two can play at that game. Your 5-year-old can cry and complain and be helpless, too. And the irony is that it works. She probably gets more attention when she acts that way. Don't forget that negative attention is always better than no attention at all.
So what can you do? The first step is to make sure she feels loved and has a role in the newly reconfigured family. Try to find a little time every day to spend one-on-one with her while the baby is sleeping or being cared for by someone else. Same goes for Dad. This provides some desperately needed positive attention. Reassure her that you love her just as much as you always did, and find ways that she can help you in caring for her little sister. Changing diapers, feeding, and bathing are probably more efficient when she is not involved, but helping gives her a needed role and sense of purpose in the family. As for the yelling, you and your husband need to make sure that you're on the same page. You may disagree, but it should almost always be done in private. In front of your daughter, you need to be a completely united front and back each other up. Your daughter will manipulate the situation if she sees an opening to divide the two of you.
What consequence is best for this situation? Spanking is not very effective in the long run for yelling and disrespect. It demonstrates that 'might makes right' and hitting is a good way to solve a disagreement. The best is a logical consequence - ignoring. Calmly (that's the hard part) let your daughter know that you will respond and help her when she is speaking respectfully. Ignore her when she yells back or warn her that she will need to leave the room for 3 minutes. Reassure her that she can be with you when she is speaking in a kind way. Then, follow through! When she does ask for things or speak to you respectfully, make sure to respond in kind. If not, ignore her or separate from her. Over time, as she realizes that she gets more attention and help when she acts appropriately, she will change her tune. If you would like to go back to time-outs, 3-minute time outs can still be effective if you have a backup for times she gets out of the chair before 3 minutes is up. A safe, mostly empty room is often the best place to use as a time-out backup. Or, you can just lead (or carry) her back to the chair each time she gets up. If you stick with your time-outs when you give them and make sure she serves each one, even if it takes an hour of going back and forth, she'll get the point pretty quickly. Then, you can warn her when she starts to misbehave. As long as she knows you'll follow through after the first warning, she'll respond.