Financial loss in power systems is an emerging problem that needs to be resolved. To tackle the mentioned problem, energy generated from various generation sources in the power network needs proper scheduling. In order to determine the best settings for the control variables, this study formulates and solves an optimal power flow (OPF) problem. In the proposed work, the bird swarm algorithm (BSA), JAYA, and a hybrid of both algorithms, termed as HJBSA, are used for obtaining the settings of optimum variables. We perform simulations by considering the constraints of voltage stability and line capacity, and generated reactive and active power. In addition, the used algorithms solve the problem of OPF and minimize carbon emission generated from thermal systems, fuel cost, voltage deviations, and losses in generation of active power. The suggested approach is evaluated by putting it into use on two separate IEEE testing systems, one with 30 buses and the other with 57 buses. The simulation results show that for the 30-bus system, the minimization in cost by HJBSA, JAYA, and BSA is 860.54 $/h, 862.31, $/h and 900.01 $/h, respectively, while for the 57-bus system, it is 5506.9 $/h, 6237.4, $/h and 7245.6 $/h for HJBSA, JAYA, and BSA, respectively. Similarly, for the 30-bus system, the power loss by HJBSA, JAYA, and BSA is 9.542 MW, 10.102 MW, and 11.427 MW, respectively, while for the 57-bus system, the value of power loss is 13.473 MW, 20.552, MW and 18.638 MW for HJBSA, JAYA, and BSA, respectively. Moreover, HJBSA, JAYA, and BSA cause reduction in carbon emissions by 4.394 ton/h, 4.524, ton/h and 4.401 ton/h, respectively, with the 30-bus system. With the 57-bus system, HJBSA, JAYA, and BSA cause reduction in carbon emissions by 26.429 ton/h, 27.014, ton/h and 28.568 ton/h, respectively. The results show the outperformance of HJBSA.