In such a situation it is very difficult to choose. But as a professional in the field I should choose comapny A because company has decided to take you and stopped the searching, in case if you rejects it will be unprofessional (if you thinks to join company B for only monitory benefits)and may hamper your creditaility in the market.Even if you want to join B you should inform the company A with all facts and problems honestly with a sorry note.