***A22A22A22A22= 16
When two math books are not adjacent to two physics books, two chemistry books should be placed between the math books with 1 book, and 1 book should be placed in the other four spaces, a22c 4 1a 22 = 32.
When two math books are different, there are 32 kinds when two adjacent physics books are adjacent.
When mathematics and physics are not adjacent, a22a22a52 =160 and ***240.
Methods 2a66-3a5a22+3a44a22a22-a33a22a22 = 240.