If you claim a dependent, and another taxpayer lists the same person as their dependent, the IRS is likely going to reject your tax return.
The IRS will process the return of the person who files first, and assume legitimacy. If the other person files before you, they will receive the benefit of the dependent. When you file your return next, the IRS will reject it.
If you find yourself in the scenario of having your e-return rejected because of another taxpayer claiming your dependent, you'll have to file a paper return. You're able to prepare your return using software online, but you'll have to physically print the return, sign it and send it through the mail to the IRS.
Your return should include a cover letter, which explains the reason why your return was rejected and supplies documentation to prove you have the right to claim the dependent. This proof can be in the form of medical records, school records, etc.
The IRS will review each return that claims the dependent and make a decision on the taxpayer who is legitimately eligible to claim the dependent.
If it turns out that both you and the other taxpayer meet the criteria to claim the dependent, the tax benefit is usually given to the person with whom the dependent lived with the most throughout the year. If the year was split equally, and the dependent spent the same amount of time in both households, the benefit is awarded to the taxpayer with the higher adjusted gross income.