If instagram sends you a notification that a specific person liked a post that you're tagged in, what does instagram consider the relationship between the people?

So I got a notification that a specific person liked a post that I was tagged in, and I want to know what algorithm calculates to show why that specific person was shown, does instagram have a favorites list?