The correct option is A
Books on each subject can be arranged amongst themselves in the following ways:
Mathematics-$$5$$ books in $$P\left(5,5\right)$$ ways$$=5!$$ways
Physics-$$4$$ books in $$P\left(4,4\right)$$ ways$$=4!$$ways
Chemistry-$$2$$ books in $$P\left(2,2\right)$$ ways$$=2!$$ways
Since, the arrangement of these three groups of subjects can be made in $$P\left(3,3\right)$$ ways.
By the multiplication principle, the required number of permutations are
$$5!\times 4!\times 2!\times 3!=120\times 24\times 2\times 6=34,560$$ ways