The correct option is D 63
Available letters :A,B,C
Here following patterns are possible:
1. XXXX (all four letters are same) only BBBB, so only 1 way.
2. XXYY (two same and remaining two are also same) = 3C2×4!2!2!=18 ways.
3. XXYZ (two same and remaining two are different)
= 3C1×4!2!=36 ways
4. XXXY (three same and remaining one is different)
Now, required number of ways :