If I said, "you will be hung tomorrow, and it will be a surprise." That statement can not be true.
So the prisoner reasons: if it is thursday night, then being hung on a friday would not a be surprise. So I will not be hung on friday.
Then there is a kind of induction which further rules out each successive day. I think the thursday night argument is correct, but the induction argument is wrong.