I am unclear what it is that you don't understand. I do not think that the past perfect is used differently in these two sentances, but I am not a grammatical expert - I am just a native Englasih speaker.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.