The wide spread of living organisms in nature and how they obtain food has prompted many scientists to form mathematical models that simulate these organisms. These models were used to solve math problems that take a long time and effort to solve, but these models were sometimes weak and required modification. In this research we used two methods to reach the optimal solution, the first method we used the Peafowl optimization algorithm (POA) with the chaos function and the chaotic tent function to reach the optimal solution and this was the first step in the work, the second method we hybridized the first step by adding the artificial hummingbird algorithm (AHA) The hybridization was of two types, the first by linking communities and the second by linking equations, and we got the optimal solution using 1000 iterations in the two steps, which resulted in producing the optimal solution.