Order the answer to: Problem: Write a function that given two lists, returns the list of all the elements that occur…