There are various ways to do this. The formula based on a probability of one event happening and the only other possibility being that it doesn't happen for k ocurrences in a sample of size n:
P( k defects in a sample of size n) = nCk Pk (1-P)n-k
Here k is 2, n is 25, P is .001. The C term is the combination of 25 things 2 at a time (which will equal 25*24/2)