Let the center of mass be at a distance r1 from mass m1 and r2 from mass m2.
The position of the center of mass is given by m1r1=m2r2.
We also know that the total length of the rod is l=r1+r2.
From these two equations, we can find the distances:
r1=m1+m2m2l and r2=m1+m2m1l
The moment of inertia of the system about the center of mass is the sum of the moments of inertia of the two masses:
I=m1r12+m2r22
Substituting the values of r1 and r2:
I=m1(m1+m2m2l)2+m2(m1+m2m1l)2
I=(m1+m2)2m1m22l2+(m1+m2)2m2m12l2
I=(m1+m2)2m1m2l2(m1+m2)
I=m1+m2m1m2l2
This is also known as the reduced mass μ=m1+m2m1m2, so I=μl2.