Question 1102309
.
The condition omitted one important detail: the books are considered as DISTINCT and DISTINGUISHABLE.



So, I will assume that this EXTENDED condition is in the place.



      Then the answer is 9! - 2*8! = 282240.



<U>Solution</U>


<pre>
The number under the question is equal to the number of ALL PERMUTATIONS of 9 = 2 + 4 + 3 books/objects

MINUS the DOUBLED number of all permutations of 8 objects, 

where we consider the two MATH book standing together as ONE emerged object with two states  M1M2 and M2M1.
</pre>