yes A is liable for the voilation of agreement But if The Govt takes the assets under compulsory aquisition & it was above the control of mr. A even then he is liable towards Mr.B. however he can claim to Govt. for compensation.
A is liable to B only for compensation becaus both the parties are not know before entering of agrement relating to goods.B claim compensation from A and A claim loss from Govt.