The proliferation of multienergy systems (MESs) in recent years has led to the higher efficiency of energy consumption in different sectors. MESs are generally studied in the context of energy hubs (EHs). Most of the previous works in the field of EH operation and scheduling are at the scale of residential households or communities. There is a research gap in proposing a framework in which the EH actively interacts with different energy networks. This article, however, is focused on the optimal operation and scheduling of the EH and two integrated energy grids such as power and heat distribution systems. The EH consists of combined heat and power (CHP), electric heat pump (EHP), thermal and electric energy storage systems, which are operated by an independent entity. The proposed optimization problem is based on the bi-level optimization method in which the EH is the leader and two networks are the followers. Nonlinear variables are also linearized using binary expansion and Big M methods. As another research novelty, uncertainties of load demand and photovoltaic (PV) systems' output power are taken into account using a mixed machine learning (ML)-based forecasting method. To enhance the flexibility of the system, a price-based demand response (DR) program is proposed based on the predicted load pattern of the mixed ML method. Simulation results show the efficiency of the optimization model. Also, the DR program has a significant impact on the system's cost by 40% improvement in the profit of the system.