If the integers m and n are chosen at random from 1 and 100, then the ...
N(S) = 100^100.
According to power cyclity of 7,
unit digit (7^n) = 7 if n mod 4 = 1.
u.d.(7^n) = 9 if n mod 4 = 2.
u.d.(7^n) = 3 if n mod 4 = 3.
u.d.(7^n) = 1 if n mod 4 = 0.
Obviously, out of first 100 powers of 7, each 25 have these unit digits stated above.
We know that a number with unit digit either 5 or 0 is divisible by 5.
From these combinations of unit digits, there only 2 desired combinations :
7 + 3.
9 + 1.
As stated above, there are each 25 powers with u.d. 7 & 3 so number of sample points in event 1 = 2*25^25.
We've multiplied by 2 because values of m & n can be interchanged.
The same thing is true for event 2.
Probability = 4* 25^25 / 100^100.
= 2500/10000 = 1/4.