Pergunta de entrevista da empresa Lloyds Banking Group

How would you join these two tables