Although shaik answered this question but way back I have solved similar kind of question-
1st case-
[91,2,13,24,77][62,72,82] now first bolded part can be arrange in how many ways = 5! = 120 ways
2nd case-
now take one element from 1st partition and put in 2nd partition but you can not put 2,13,24 because if you will move that then 62,72 wil not come at position 6 and 7. So move 91 and 77 one by one
a) now take 91, we can arrange in following ways [62,_,72,82], [62,72,_,82],[62,72,82,_] (place 91 at each blank) so there are only 3 ways and 4 elements in 1st partition can be arranged in 4! ways. So total ways = 3*4! = 72 ways
b) now take 77, we can arrange in following ways [62,_,72,82], [62,72,_,82] (place 77 at blanks and we can't put 77 after 82) so there are only 2 ways and 4 elements in 1st partition can be arranged in 4! ways. So total ways = 2*4! = 48 ways
3rd case-
now take two elements at one time (91,77).
a)take (91,77), we can arrange in following manner[62,_,77,_,72_,82_] and [62,_,72,_,77_,82_] (place 91 at each blank and look we can't use [62,_,72,_,_,82_,77,_] because 77 can't come after 82)so there are 8 ways and 3 elements in 1st partition can be arranged in 3! ways. So total ways for (91,77) = 8*3! = 48
Total ways = 120 + 72 + 48 + 48 = 288 ways