Explanation:
a) [tex]I=\displaystyle \sum_{i}m_ir_i^2[/tex]
where [tex]r_i[/tex] is the distance of the mass [tex]m_i[/tex] from the axis of rotation. When the axis of rotation is placed at the end of the rod, the moment of inertia is due only to one mass. Therefore,
[tex]I= mr^2 = (2\:kg)(3\:m)^2 = 18\:kg-m^2[/tex]
b) When the axis of rotation is placed on the center of the rod, the moment is due to both masses and the radius r is 1.5 m. Therefore,
[tex]\displaystyle I= \sum_{i}m_ir_i^2 = 2(2\:kg)(1.5\:m)^2 = 9\:kg-m^2[/tex]