The optimal beam-loading in two-bunch nonlinear plasma wakefield accelerators