Wayve interview question

Write a python function to merge 2 array sets with some conditions.