Combining two Arrays of hashes based on a hash key
First create a hash that maps names to the hashes for one list:

people2_by_name = Hash[people2.map { |h| [h[:name], h] }]


Filter the other list

people1.select { |h| people2_by_name.has_key?(h[:name]) }
       .map { |h| [h, people2_by_name[h[:name]]] }


This will only work properly if there are no duplicate names in each, but it is \$\mathcal{O}(n)\$ in the number of hashes.