This is real easy but it doesn't sound like you've taken the first proper step. Contact company "A" and explain the situation. Then have company "A" inform company "B" that it's against their policy for their employees to work unpaid overtime simply because that's what the contract says... "All hours put in will be paid".
I believe you'll find that company "A" has such a policy and will be happy to help you enforce it.
--Jeff Moden
Change is inevitable... Change for the better is not.