I am happy to help you. If you need clarification with this answer, hit reply and ask a follow up question prior to providing a rating. Otherwise, after reviewing the answer, please provide a positive rating without additional cost to you so I receive credit for the services I am providing you.
This is complicated so try to follow me. When someone breaches a confidentiality agreement, the aggrieved party (the party that was allegedly hurt) has claims for injunctive relief (e.g., a restraining order to prevent the use of the information) and for damages. If you had an agreement with Company A and you breached the agreement, then Company A could seek injunctive relief and damages. It is more complicated with Company B. It is unclear what confidentiality agreement Company B had with Company A. If there was an agreement, then Company B could sue Company A, and Company A would implead you (include you in the claim). However, even if you are liable both Company A and Company B would have to prove damages. This is usually done by showing how profits or revenue decreased (if they did) due to the breach. For a person to protect themselves in this situation, it is best to attempt to seek a release from liability when settling the matter. For example, if returning the disclosed document is a remedy, the party returning it (you) would attempt to seek a release from damages from Company A. Company B would be more difficult because there was no direct relationship with Company B and you (the alleged breacher of an agreement with A). In any event if Company B wants to sue, they would have to show that they had a confidentiality agreement with Company A and would need to show damages.
Feel free to ask follow up questions before providing a rating. This information provided to you is informative and helpful. If you need clarification, feel free to hit reply so we can work on any clarification prior to providing a rating. Otherwise, please provide a positive rating now without an additional cost to you so I receive credit for the services I am providing to you. I am doing my best to help you. Thank you, Damien