Responding to a pm:
Q1: I want to select 3 items out of 5 items (2 of which are identical).
e.g. AABCD
There are 2 different cases:
Case 1: All distinct letters (e.g. ABC, ABD, ACD, BCD)
4C3 i.e. 4 ways
Case 2: 2 letters same (e.g. AAB, AAC, AAD)
Select the two As and any one of the other 3 in 3C1 = 3 ways.
Total = 4+3 = 7 ways
Q2: Arrange 3 letters in 3 places out of 5 letters, 2 of which are identical:
You have already selected the letters above. You further need to arrange them here:
Case 1: Arrange the 3 distinct letters you chose above in 3! ways. So selection and then arrangement gives you
4 * 3! = 4! = 24 ways (e.g. ABC, ACB, BCA, BAC etc)
Case 2: Arrange the 2 identical and 1 different letter selected above in
3 * 3!/2! = 9 ways (e.g. AAB, ABA, BAA etc)
Total = 33 ways
Total = 4+3 = 7 ways