I am not a lawyer. Definitely seek guidance from your legal counsel. That's why they get paid the big bucks.
1. Hard to say without reading the contract. Please DO NOT post it though.
2. The original NDA between the government and B is worthless to A. Who is A going to take to court? B? Nope. B had no contractual obligation to A to keep A's data confidential. The original NDA goes against the fundamental tenets of contract law.
Regarding releasing proprietary data, an interesting case regarding FOIA was recently decided by SPOTUS. https://www.jdsupra.com/legalnews/supreme-court-removes-substantial-91552/ This case was about data marked as proprietary being disclosed to a competitor via a FOIA request. SPOTUS ruled "that those submitting confidential information to the government need not demonstrate a 'substantial competitive harm' to protect that information from disclosure under the Freedom of Information Act." If the government does not have the rights to the data and the data is not subject to FOIA, then the data might not be able to be given to B.
3. Just because the government gained unlimited access doesn't mean it give access to a third party. Seeing as how the information was previously shared with B and A knew about it, A might not be able to say much now.
Yeah, definitely talk with your legal counsel about it.