Lets assume I am a cashier in a convenient store. I am serving a customer who is buying lots of stuffs. I do not want second customer on the line to get bored. I can say "I will be with you in a moment" to the waiting customer. Is it okay to say "I will be right back with you"? Does the latter sentence mean the same as the former? Thanks!
I don't think they are equivalent. We say "I will be right back with you" to a customer who is being attended to (or helped) at that very moment by us.
For example, a cashier would say "I will be right back with you" to a customer who is first in line or is being helped, if the cashier needs to leave the cash register/counter momentarily for some reason (e.g., needs to go check the price, speak to the store manager, call for help, fetch grocery bags). You can't say "I will be right back with you" to the second person in line, as you were not there with them to begin with (you are still helping customer A).
Note that depending on the situation, if you do say something to the second customer while you are still helping the first customer, there is a chance that the first customer might feel neglected or rushed. In such a case, a cranky and surly person might make some rude comments.