The expression for bending resistance depends on which concrete material model (linear, bi-linear, constant with Whitney coefficient, parabolic) and steel material model (elastic-ideally plastic, elastic-plastic with hardening etc.) one uses. The simplest case with rebar on only one side, Whitney stress block for concrete, elastic-ideally plastic rebar material is shown in most textbooks.
Eurocode presents the principle (see answer by HTURKAK), from which one can derive equilibrium and moment equations for arbitrary sections with arbitrary reinforcement by using first principles (strain across cross-section, stress-strain laws, force balance, moment balance) of concrete design.