in how many ways could the digits in the number 458 978 be arranged if the prime digits must remain in the original position

i understand that after removing the prime digits you'd be left with 4_8 9_8 and that you have 5 spots where you can put 5 then 4 spots when you can put 7 but after that I am not sure

3 answers

there are 4!/2! permutations of 4 things with 2 duplicates
thats what I had gotten but on my textbook, it says the answer is 24
well, they can in fact be arranged in 24 ways, but unless you can distinguish the two 8's (say, by color), only 12 will be unique.

Even textbooks can have mistakes.