This is a required-digit / complement counting question. You know this because the phrase "must appear" signals a condition that is easier to handle by subtraction than by direct listing.
Step 1 — Understand the direct approach's difficulty.
Directly counting numbers where digit 5 appears "somewhere" is awkward, because 5 could be in any position, and cases would need to be split by which position it occupies.
Step 2 — Understand the complement approach.
It is much easier to count all valid numbers (ignoring the digit-5 requirement) and then subtract the numbers where 5 never appears at all.
Step 3 — Check why this works.
Every valid number either contains digit 5 at least once, or it does not contain 5 at all — these two groups cover everything with no overlap. So subtracting the "never contains 5" group from the total leaves exactly the "contains 5 at least once" group.
Step 4 — Match to Assertion and Reason.
Assertion A describes exactly this subtraction method, and Reason R correctly explains why the subtraction gives the right group. So both are true, and R explains A.
Answer: Option A.
Common trap: trying to directly count numbers containing digit 5 by fixing its position case by case, which is far more error-prone than the subtraction method.