I think it’s possible to escape on Day 2 if you keep that knowledge:
A is 12, B is 8
A knows B is either 6 or 8. If 6, B knows A is either 12 or 14. If 8, B knows A is either 10 or 12.
B knows A is either 10 or 12. If 10, A knows B is either 8 or 10. If 12, A knows B is either 6 or 8.
So the common knowledge (they both know it and they both know the other knows it too) at the beginning is: A is between 10 and 14 and B is between 6 and 10.
Day one: if A saw 13 or 14 they would know it was 20, so when A passes, that signals to B that A is between 10 and 12.
Now, if B saw 9 or 10, they would know it was 20, so B must be between 6 and 8
Day two common knowledge: A between 10 and 12. B between 6 and 8.
If A saw 10 or 11 they would know it was 18, so when they pass B knows it must be 12
B knows it’s 20, and wins.
... Right?