Here is link that explains it.
https://turbotax.community.intuit.ca/community/credits-deductions/discussion/who-claims-the-kids-in-...