In this paper, we investigate how two on-side doped impurities with net magnetic moments in an edge chain of a zigzag phosphorene nanoribbon (zPNR) can be entangled by scattering of the traveling edge-state electrons. To this end, in the first step, we employ the Lippmann-Scwinger equation as well as the Green's function approach to study the scattering of the free traveling electrons from two magnetic impurities in a one-dimensional tight-binding chain. Then, following the same formalism, that is shown that the behavior of two on-side spin impurities in the edge chain of a zPNR in responding to the scattering of the edge-state traveling electrons is very similar to what happens for the one-dimensional chain. In both cases, considering a known incoming wave state, the reflected and transmitted parts of the final wave state are evaluated analytically. Using the obtained results, the related partial density matrices and the reflection and transmission probabilities are computable. Negativity as a measure of the produced entanglement in the final state is calculated and the results are discussed. Our theoretical model actually proposes a method, which is perhaps experimentally performable to create the entanglement in the state of the impurities .