组里有俩人， 一个技术牛，但是人品烂， 挖坑设陷阱， 挑拨离间， 孤立新人。另一个技术不如前一个， 但是人品可靠， 从来不做烂事。而且做事出发点确实是team work。 如果你是老板你要哪个？只能要一个。
Both of them can be kept. You are the one who should be got rid of.
Because the reality probably is none of them is as bad as you described and you are the exact one with too much negativity.
How many questions have been asked in this room on behalf of "my friend"? You didn't mention the opinion of anyone of the rest of team. Could just be your impression only? Or even the team is made of only two, the capable loner, and the incapable nice newcomer (you)? If I'm the boss, I care most whether the job be done. In this case, whether you are the nice newcomer or not, you are the one breaks the cover and ask for a breakup of the team, so you have to be the one to go.
Reality is harsh so is honest.
In a long term, there are a few options. 1. Leave A/B alone, you get A's expertise, however you have to spend your time to fix "bad" stuff created by him.
This actually is not bad. You have some work to do that is why you are valuable! :-)
2. Change A's behavior. You will be the mentor of A, and help him to grow to be a better leader in managerial area.
If A is smart enough, you will be replaced or he will find a new position. However if you get promoted, it is worth a try as A will be loyal to you.
3. Change B's behavor to improve his technical skill
Similar to 2
4. Many more options as we are the people. Management is never easy :-)