We propose a microscopic model that is capable of describing the features of both deuterated and nondeuterated betaine phosphate (BP)-betaine phosphite (BPI) solid solutions in the region of small concentration of BP, The size mismatch between the BP and BPI structural units, which leads to a drastical change of the nearest-neighbor interactions in the vicinity of single BP impurity, was taken into account in the model. We show that the model quite accurately reproduces the experimentally observed abrupt drop of the ferroelectric phase transition temperature. The onset of the glass state given by the model also agrees well with the experimental results.