My grandson lived in CO & MD for 2024, he was a part year resident in both states, why is his total income showing on the MD state return?

how to determine residency status when lived in 2 states and worked in both states