First guy knows he wants a beer, but doesn't know if the others do, so says he doesn't know if all three do. However, if he had not wanted a beer, he would have known that not all three wanted one, and therefore would have said no. Which means the second guy then knows that the first guy wants a beer, but does not know if the third does. So he says he doesn't know. That gives the third guy, who also wants a beer, with enough information to say that all three want a beer