The aim of this paper is to discuss the model of two noninteracting particles confined in a box with impenetrable walls in the presence of the impenetrability condition and without them and investigate the limits of applicability of the separability of the center of mass motion of a confined system.