Also you can enter in room ''B'' with the head in the floor of room ''A'' and then, when the walls close, tp to your head. In this way you will not able to enter in room ''B'' again.