If I am understanding this correctly, the child lived with both of you for 3 months? Time with father would be 1.5 + 3 =4.5 months total. Time with mother 3 + 5.5 = 8.5 months. If the child was with you for 8.5 months, all overnights, then your are technically the qualifying parent because you have more than 50% of the overnights. I assume you were never married? If you were married and now seperated/divorced, different rules may apply :/
My personal experience, I am not married and i have a joint custody agreement 50/50. However, since the father continuously asks me to watch him many overnights without making up the time, he gives me more than 50% overnights. He then forfeits his right to claim him, lol. If he actually followed the custody agreement, he makes more than me annually, then he could claim him. If an auditor contacts me, I simply give them the documented information to show proof the child was in my care. Hope this helped.