This question already has an answer here:
At the end of Avengers: Age of Ultron, Thor says:
The Mind Stone is the fourth of the Infinity Stones to show up in the last few years. It's not a coincidence.
Although all these Marvel-films are intertwined somehow, how did Thor know about what happened in Guardians of the Galaxy?