Another way to reach the same answer is to assume, to begin with, that we don't know which digit is different, and test each candidate against the majority style found in the rest of the row.
First, establish what the "majority" style looks like by comparing any three or four digits picked at random from the row. If they all share the same plain, evenly-weighted letterform with no extra decoration, that plain style is treated as the baseline font for the whole set.
Next, check each digit one at a time against that baseline. Digits 1, 2, 3, 4, 6, 7, 8, and 9 all match the baseline's plain, undecorated stroke style, so none of them stand out.
Checking the digit 5 against the same baseline, however, turns up small decorative ticks at its stroke ends that the baseline style does not have, so 5 fails to match the majority style while every other digit passes.
Since exactly one digit fails to match the shared baseline and every other digit matches it, that one digit is the answer.
So the correct answer is 5.