We have strings of length seven made up it numbers on the faces of a die.

The questions is: "how many of those strings contain exactly two 5's"

There $^7C_2$ places for the two 5's. The probability of two 5's is $\left(\frac{1}{6}\right)^2$

The probability of five non-5's is $\left(\frac{5}{6}\right)^5$.