I filled in for two dates, which turned into 8. When they couldn't find anyone else they liked, I was drafted. I was having fun, it was low pressure and they had better gigs... even though the band wasn't as good. Drummer is awesome at getting gigs. I wanted to play more.
Kinda begs the question... Better band? or better gigs? Maybe we'll save that for another thread.
Ah, ok. I don't usually play with more than one band at a time, the only time I have was to fill in, such as yourself, but in the end I go back to the primary band, and the reason for this is that I should be able to have my needs met with the primary band, though I am not looking at this from a monetary angle (perhaps you are, I don't know). My band needs are excellent musicianship, lots of gigs, fun but willing to work hard, and chance to contribute in the creative process (I do mostly originals), usually in that order. Money isn't a huge factor for me as long as I can cover my costs, which is usually the case.
So, given that, if another band wanted me to play with them, and I felt like I was getting more of the things that I wanted from the new band, then I would have to think long and hard about why I was still with the first band if I'm not getting my needs met, and unless I thought there wasn't any hope, I would bring my concerns to the first band and say "hey, I'm not getting everything I want out of this band, can we do something about this or do I need to leave?". Obviously all of this is just from my perspective, which is different from yours, but that's how I would go about it.
To bring it back around to your situation (sorry for the long winded explanation) maybe if you had those things that Band B gives you in Band A, you wouldn't be in this position. Better and more gigs, fun and low pressure.......maybe those things should be in Band A? If there is something in Band A that you can change to help give you more of the things that you have in Band B, what would that be?
Of course, now that it's all said and done, perhaps the best thing to do is just tell Band A that you are first come, first serve, and if the guitarist doesn't like it, that's too bad. You can walk anytime you want, don't let someone's crap attitude get you down.