1)
Why did they flee to Afekah?
1.
Radak: Melech Yehudah was b'Shalom with Melech Aram. (This is Afekah in Yehudah - Radak 26.)
2)
When did the wall fall on them?
1.
Radak: It was when they were at the entrance of the city.
3)
Why did Ben Hadad not die when the wall fell?
1.
Radak: He and his servants were the first, or last, of the 27,000. It was Hashgachas Hashem that he did not die.