Well yeah - that's how the legal system works assuming it gets all the way to court. In reality, Meta and OpenAIs lawyers will do a risk evaluation against the strength of the claim and if there's any merit at all there will be a quiet settlement.
IANAL, but my understanding is that in the United States, a civil defendant who prevails is not usually entitled to have their legal fees paid by the plaintiff.