Hi Kristy,
I think you did exactly the right thing. Five-year olds know what boys and girls are. The concept of being transgender is probably not even a thing for a five- or seven-year old, and very likely not something the parents wanted to start discussing on their way through the check stand and as they drive home, lol.
With kindness,
Terri