A model of dynamics of three interacting species is presented. Two of the species are prey and one is predator, which feeds on both prey, however with some preference to one type. Prey compete for space (breeding) although they always have access to food. Predators in order to survive and reproduce must catch prey, otherwise they die of hunger. The dynamics of the model is found via differential equations in the mean-field like approach and through computer simulations for agent-based method. We show that the coexistence of the three species is possible in the mean-field model, provided the preference of the predators is small, whereas from simulation it follows that the stochastic fluctuations drive, generally, one of the prey populations into extinction. We have found a different type of behavior for small and large systems and a rather unexpected dependence of the coexistence chance of the preference parameter in bigger lattices.