lets P1 who's AT is 4 unit of time and P2 AT is 5 unit of time then 0-4 unit of time CPU becomes idle, after the 4 unit of time only P1 arrive so it schedule first. then comes P2 (Fig A)
Another way If P1 having AT of 4 unit of time, but P2 having arrival time of 2 unit then first P2 arrive then come to P1 (fig B)