The transition relation is an if-then-else. Since in the first four lines p is false, right part of the if-then-else (the else-part) needs to be satisfied. The right part requires p' and a to be equal. This is the case of a = p' = 1 (fourth line), and a = p' = 0 (first line), but not for a = 0, p' = 1 (second line) or a = 1, p' = 0 (third line).