(A) Boxes are different and Journal are different. we can choose the first box in 4 ways,second box after choosing the first box in 3 ways ,third box in 2 ways ans fourth box in 1 way.Hence the nos of ways we can choose the boxes are 4*3*2*1=24 ways.
further outof 40 journal we can choose 10 journals in 40 C 10 ways=2542981584 ways Hence the total nos of ways we can distribute the journals in four boxes are=2542981584*24 ways.
(B)Sice the boxes are identical,hence we can not differentiate the boxe and nos of choosing such boxes will be 1.
in this case the total nos of ways we can distribute the journals in 2542981584 ways.