There are 6 distinct letters given: A, D, R, O, I and T.
The total number of 6-letter strings that can be made = \(6_P_6\) = 6! = 720.
Note that this represents ALL the 6-letter strings that can be made. However, we do not want ALL of them. We just need the strings which neither begin with T nor end with A. Therefore, answer options A and B can be eliminated.
Number of 6-letter strings which neither begin with T nor end in A = Total 6-letter strings – (Strings that begin with T) – (Strings that begin with A) + (Strings that begin with T and end with A).
Note that the last part is being added because you cannot subtract the same component twice.6-letter strings that begin with T = \(5_P_5\) = 5! = 120. Since the strings begin with T, the other 5 letters can be arranged in 5 places in \(5_P_5\) ways.
6-letter strings end with A = \(5_P_5\) = 5! = 120. Since the strings end with A, the other 5 letters can be arranged in 5 places in \(5_P_5\) ways.
6-letter strings that begin with T and end with A = \(4_P_4\) = 4! = 24. Since the strings begin with T and end with A, the other 4 letters can be arranged in 4 places in \(4_P_4\) ways.
Therefore, required answer = 720 – 120 – 120 + 24 = 504.
The correct answer option is D.