If BRASS is coded as 63816, then SIR will be coded as -
S = 6 because 6 appears twice in the code for BRASS. So SIR will contain one 6. Now, R is common to BRASS and SIR, so SIR should contain 6 + one and only one out of (1,3,8) + any other number. So 617 is the only correct option out of the given ones.