NLP Help needed. Probability two words to be next to each other

It,s supposed to use word2vec or GLoVe, but I am not very confident.