Hello, I don't know if you are still having issues on this problem since it has been awhile, but I might as well try to answer it, just in case that you still haven't figured it out.
You did the first line correctly as you use the for loop to go through the second list for the numbers. I see that your thought process is to find the numbers that the lists need.
The problem comes in the second line of the code where you put if( first.contains(x){ which means that if first contains the number, then you remove it according to the next line, but you cannot remove the number 4 and 3 since second doesn't have those numbers.
Instead, if you put that if(!first.contains(x){ which means if first doesn't contain a number. You can also change the next line to first.add(number); .
These two new lines mean that if first does not contain a number then you could add those numbers to both lists. For example, if first doesn't have 4 and 3 then add it to list 2 since that is what the for loop is doing, searching. It could be the other way around, if second does not contain a number then add that to first. This will avoid duplicates since you if already has the number, it won't add it again.
The last line, first.addAll(second); is unnecessary because after everything is out, it will force the numbers into first and that will end up containing duplicates.
Sorry if what I wrote is hard to understand.