After giving it a thought I came up with this.
First of all 12,62,82 are the values whose order we must not disturb, the reason behind this is they are eager for the same position. So for example, if 62 or 82 came earlier than 12 then they will take the position of 12 and end up in a different hashtable state.
So we will take them as a single entity "12,62,82" named DND(DO NOT DISTURB).
1- Now we have 91,2,13,24,77 they all are independent of each other as they are seeking different hash positions, let's call them "Freebies". Meanwhile, DND is sitting quietly after Freebies combinations.
Total combinations -> 5! => 120.
2- Now we will take elements one by one from DND without disturbing their own order and settle with others -
I -> 12 before 77 -> [comb(91,2,13,24), 12, 77, 62, 82] -> 4!
II -> 12,62 before 77 -> [comb(91,2,13,24), 12, 62, 77, 82] -> 4!
Total combinations -> 4! * 2.
3- Now 91 is the number that will not disturb the DNDs. Putting 91 after DND we have three cases -
I -> DNDs between 77 and 91 -> [comb(2, 13, 24, 77), DNDs, 91] -> 4!.
II -> Now let's disturb DNDs and take element 12 from them and put it before 77 -> [comb(2,13,24), 12, 77, 62, 82, 91] -> 3!
But I can put 91 before 82 and 62 as well which will add up to 3 combinations with 3!
Which takes sum to 3! * 3.
III -> Now taking 62 from DNDs and putting it between 12 and 77 -> [comb(2, 13, 24), 12, 62, 77, 82, 91] -> 3!
Again here I can put 91 before 82 which will add all to 2 combinations with 2! ->3! * 2.
Total Combinations -> 4! + 3!*5
**Now the answer that came into the picture is -> 5! + 4!2 + 4! + 3!5 -> 222.
That's all that I can figure out. Please tell me if I did something wrong.