In Algeria, the citrus whitefly is a significant pest. To avoid the use of insecticides, the National Institute of Plant Protection (INPV), located in El Harrach, Algeria, has implemented a biological control strategy. This method involves introducing parasitoid insects (Cales noacki) to combat crop pests. To control an initial nuisance fly population \(x_0 > 0\) , a population of predatory insects \(y_0 > 0\) is introduced into the ecosystem to feed on the pests. These predators, in turn, are attacked by other predators. Using the Verhulst model, we have formulated two problems: the first involving two species and the second involving three species. The existence and uniqueness of the solution are verified. We formulate optimal control problems where the objective is to minimize the number of whiteflies while maximizing the number of predators introduced at the final fixed time T. The stability of the systems around equilibrium points is analyzed. The problems are solved theoretically using Pontryagin’s maximum principle. Various resolution methods have been explored and implemented, including the indirect method based on the shooting technique and the direct method.