I have been looking for a similar post in the forum and am glad this has already been posted over here. Although not seen any further comments to @frappeval which is sufficiently detailed.
The feature requested here aims at making ERP a system which can be used as a Franchise based software by partnering companies (Company B in example above). So this is a B2B and B2C model.
The sale will only take place for Company A to Company B once Company B has sold the inventory item to its customer. Till this point the transaction is just a invenory lending transaction.
I do not believe this is currently possible in ERP but would be a really good feature (according to me) as it then enables companies to migrate from the low user ERP plans (just Company A) to the high user ERP plans (Company A along with franchise partners like Company B) and at the same time build a successful franchise business models which currently I do not believe is technically possible based on the above post.