The global spread of COVID-19 is devastating health systems and economies worldwide. While the use of vaccines has yielded encouraging results, the emergence of new variants of SARS-CoV-2 shows that combating COVID-19 remains a big challenge. One of the most promising treatments is the use of not only antibodies, but also nanobodies. Recent experimental studies revealed that the combination of antibody and nanobody can significantly improve their neutralizing ability through binding to the SARS-CoV-2 spike protein, but the molecular mechanisms underlying this observation remain largely unknown. In this work, we investigated the binding affinity of the CR3022 antibody and H11-H4 nanobody to the SARS-CoV-2 receptor binding domain (RBD) using molecular modeling. Both all-atom steered molecular dynamics simulations and coarse-grained umbrella sampling showed that, consistent with the experiment, CR3022 associates with RBD more strongly than H11-H4. We predict that the combination of CR3022 and H11-H4 considerably increases their binding affinity to the spike protein. The electrostatic interaction was found to control the association strength of CR3022, but the van der Waals interaction dominates in the case of H11-H4. However, our study for a larger set of nanobodies and antibodies showed that the relative role of these interactions depends on the specific complex. Importantly, we showed Beta, Gamma, Lambda, and Mu variants reduce the H11-H4 activity while Alpha, Kappa and Delta variants increase its neutralizing ability, which is in line with experiment reporting that the nanobody elicited from the llama is very promising for fighting against the Delta variant.