Get your taxes done using TurboTax

If the child lived with you, you can claim him.  Since the mother already claimed him our return will be rejected it you claim him now.  File a paper return with an explanation of why you are claiming him and the IRS will sort things out.