Solve this birthday riddle with a little logic and math power

It’s a real head-scratcher.