An increase in the cobalt concentration in Pr-Dy-Fe-Co-B alloys leads to the substitution of Co atoms for Fe atoms in the atomic positions, which are the nearest neighbors with the rare earth metal atoms, and to the formation of a significant number of boron rich phases. At the highest (limiting) cobalt concentrations, boron can be substituted for the transition metals. As a result, the exchange interaction between magnetic sublattices of the rare earth and transition metals is weakened. In turn, this leads to a decrease in the contribution from the rare earth ions to the magnetic anisotropy, the temperature stability of which increases.