Pergunta de entrevista da empresa World Bank Group

How would you merge these two datasets in R?