Your examples have 3 entries that are in both files, not 2......
To use diff (or in this case comm) you need to have sorted in-files. If they are sorted then the following will show entries that are in both files: comm -12 file1 file2
$ cat file1
$ cat file2
$ comm -12 file1 file2
Hope this helps.