M.D.
3 of my 4 siblings are in HR and it makes their life so diffuclt when people do what you are doing. I've done it a million times myself because we have to do what is best for us. So you can do 1 of 2 things.
1.) Take the job at B and keep the lines of communication open with A. If you'd be miserable, then why would you want to tsay there for a long time?
2.) Call A and tell them you have an offer on the table and ask if they will be able to move things a little faster with you? I'm willing to bet they will if they want you - BUT if they are a highly sought out company, then you never know.
What's wrong with where you are? Is B better than where you are? If so, go ahead and take that and see where the chips fall.
Good luck and congrats!