Moment of inertia of the particle on the left is `m_1r_1^2`
Moment of inertia of the particle on the right is `m_2r_2^2`. Moment of inertia of the rod is negligible as the rod is light.
Thus the moment of inertia of the system about AB is
`m_1r_1^2+m_2r_2^2`