Given:
Let $A$ be the set of all 4-digit natural numbers having exactly one digit equal to 7.
A number is divisible by $5$ with remainder $2$ if and only if its unit digit is 2 or 7.
We are required to find:
\[
P = \frac{\text{Number of favourable elements}}{\text{Total number of elements in } A}
\]
Step 1: Total number of elements in set $A$
We count all 4-digit numbers having exactly one digit equal to 7.
\underline{Case 1: 7 in the thousands place}
Form: $7abc$
- Thousands place fixed as $7$
- Remaining digits cannot be $7$
- Each of the remaining three places has $9$ choices
\[
N_1 = 9^3 = 729
\]
\underline{Case 2: 7 not in the thousands place}
- Choose position of $7$ among hundreds, tens, or units: $3$ ways
- Thousands place cannot be $0$ or $7$: $8$ choices
- Remaining two digits cannot be $7$: $9$ choices each
\[
N_2 = 3 \times 8 \times 9 \times 9 = 1944
\]
\[
n(A) = N_1 + N_2 = 729 + 1944 = 2673
\]
Step 2: Favourable cases (remainder $2$ when divided by $5$)
This happens when the unit digit is 2 or 7.
\underline{Case A: Unit digit is 7}
Since exactly one digit is $7$, the unit digit must be $7$.
Form: $abc7$
- Thousands digit $\neq 0,7$: $8$ choices
- Hundreds and tens digits $\neq 7$: $9$ choices each
\[
N_A = 8 \times 9 \times 9 = 648
\]
\underline{Case B: Unit digit is 2}
Now the digit $7$ must be in one of the first three places.
\underline{Subcase B.1: 7 in thousands place}
Form: $7ab2$
- Hundreds and tens digits $\neq 7$: $9$ choices each
\[
N_{B_1} = 9 \times 9 = 81
\]
\underline{Subcase B.2: 7 in hundreds or tens place}
- Choose position of $7$: $2$ ways
- Thousands digit $\neq 0,7$: $8$ choices
- Re