I know that, but they don't. All they know is the other dude has a 12 and that the total is either 24 or 27.

A: 1a: If B had a 9, I'd have a 15.

1b: B has a 12, therefore I don't have a 9.

1c: 12+12=24 and 12+15=27, therefore the number on my forehead is either 12 or 15

A answers no

B: 1a: If A had a 9, I'd have a 15.

1b: A has a 12, therefore I don't have a 9.

1c: 12+12=24 and 12+15=27, therefore the number on my forehead is either 12 or 15

1d: A answered no on the first round, so he doesn't know whether the number on his forehead is 12 or 15 either.

1e: If the number he sees on my forehead was 15, he would know for sure that his is 12, since 15+15 is not a valid option.

1f: Since he does not know for sure he must see a 12 on my forehead.

B doesn't know that A has disqualified a 9. They each know that they don't have a 9, but they don't know that the other knows that. If B knows that B has either 12 or 15, he also knows that A is seeing 12 or 15 and A might be thinking that himself might have 12, 15, or 9, even though we know that A has disqualified 9.