The moment of inertia of disc B about an axis perpendicular to its plane and passing through its center is $I_B = \frac{1}{2}Mr^2$. For disc A, we use the parallel axis theorem. The moment of inertia of disc A about its own center is $\frac{1}{2}Mr^2$. The distance between the axis of rotation (center of B) and the center of A is $2r$. So, $I_A = \frac{1}{2}Mr^2 + M(2r)^2 = \frac{1}{2}Mr^2 + 4Mr^2 = \frac{9}{2}Mr^2$. The moment of inertia of the system is $I = I_A + I_B = \frac{9}{2}Mr^2 + \frac{1}{2}Mr^2 = 5Mr^2$.