Could you tell us a bit more what you exactly want to do. I don't understand 'which 3 values are matched' and the result you generate at the end (i) is empty. Please make sure you have a reprex that can recreate the situation you want and provide more details so we know what the problem is you're trying to solve.
If you run st_join(p1,p2, join = st_equals, left = F) you'll be able to see which points matched. If you run nrow(st_join(p1,p2, join = st_equals, left = F)) you'll only be able to the number of matches that occurred. Does that make sense?