The result of rolling a number cube 7 times is a 7-digit number composed of digits 1,2,3,4,5 and 6 so that digits can repeat. The total number of possibilities is 6^7.
The number of possibilities where 4 appears exactly two times is 5^5*(7!-6!/2). 5^5 is the number of 5-digits numbers composed of digits 1,2,3,5 and 6 so that digits can repeat. 7! is the number of permutations of digits 1,2,3,4,4,5 and 6. 6! is the number of permutations of digits 1,2,3,{4,4},5 and 6. We don't want to subtract all numbers where digits 4 appear side by side. That's why we must divide 6! by 2.
You add the amount of pages that she has read in all which is 42+32=72. Then you subtract the sum by the amount fo pages in the book: 232-72 which equals 160