Spoiler:
Night 1
X+Y = 13 or 10.
East sees X, therefore he knows West must be seeing (13-X) or (10-X). If X ≠ 13 then no one is freed and X ≠ 0.
West sees Y, therefore he knows that East must be seeing (13-Y) or (10-Y). If Y ≠ 13 then no one is freed and Y ≠ 0.
No one is released, therefore X ≠ 13, Y ≠ 13, nor 0.
Night 2
Neither X nor Y = 0 1 2 11 12 13
East sees X, therefore he knows West must be seeing (13-X) or (10-X).
West sees Y, therefore he knows East must be seeing (13-Y) or (10-Y).
If neither X nor Y = 10 neither can be certain.
No one is released, therefore X ≠ 10, Y ≠ 10, nor 3.
Night 3.
East sees X, knowing West sees (13-X) or (10-X).
West sees Y, knowing East sees (13-Y) or (10-Y).
If neither X nor Y = 11 neither can be certain of what the other sees.
No one is released, therefore X ≠ 9, Y ≠ 9, nor 4.
Night 4.
East sees X, knowing West sees (13-X) or (10-X).
West sees Y, knowing East sees (13-Y) or (10-Y).
If neither X nor Y = 10 neither can be certain of what the other sees.
No one is released, therefore X ≠ 8, Y ≠ 8, nor 5.
Night 5.
Only 6 & 7 remain = 13