You weren't rude at all. Woman2 was fine to allow Woman1 to get in front of her (assuming she was the last person in line) but she shouldn't have spoken for everyone else. Woman1 was rude to assume that she could get ahead of everyone and not just the woman who she asked.
The other day DH and I were in line with one man (probably 20+ items) in front of us and two people behind us. We had 4-5 items. Just as the man was about to step up and begin unloading a woman approached, put her arm around him, and said "HI!! I was heading to a line over there (indicating another line with 3-4 people waiting) and I saw you standing here so I just had to come and say hello. How are you?" As he began to reply she set her hand basket on the counter and interrupted him, saying "You don't mind if I go first, do you? I only have a few things." He said "Not at all, go ahead!" and she did as they continued to chat.
DH, who wasn't polite either and I'm not excusing him, said sarcastically and loudly enough for them to hear "I suppose it's fine with us, too, not that you asked, but I don't know how anyone behind us feels." They both ignored him completely. The lady immediately behind us let out a big sigh (not sure if that was for the lady who cut or DH, honestly) and the lady behind her left and got into another line.
Who does that? I don't know if she was genuinely happy to see the man or just angling for a good excuse to cut but it was such total snowflake behavior!!