Wow, so many options. If company A is always more important than B, HG priority will get the job done. Otherwise if you're using HGs the agent will only see one call ringing at a time...next call goes to a different agent so first agent doesn't have a choice to pick it up. Even a CTI app like Xarios won't help, because again each agent sees only one call at a time.
If you're using all-ring HG here's a solution for you: create two HG, one for A, one for B. Only member of group A is PHANTOM EXT X, only member of HG B is PHANTOM EXT Y. Put secondary call keys on agents' phones representing X and Y. When a call comes to the group. corresponding button on agent phone(s) will flash and phone(s) will ring. Agent presses button to answer call he wants. I've sometimes done this with one or more "regular" HG plus one or more "phantom" HG.