How to fix when both parents claim the same dependent ?

I accidentally claimed both my daughters, so when my girlfriend tried claiming one of them it made it to where now she owes money to the IRS. How can I fix this mistake ? Obviously she was claiming her own daughter so if there’s anyway we can fix this, can someone please give us some information ? Thank you.