In such a situation as one described above, it would be quite hypocritic to choose company B as you have already accepted the offer from company A. Nevetheless you need to look at the long run of your career. Company A may obiviously get another person but you may find to bit late to get a company B.