The moment of inertia of the rod is
The moment of inertia of each side about an axis through the center and perpendicular to the plane of the square can be given by using the parallel axis theorem.
Where is a moment of inertia about the center of mass, m is mass d is the distance between two axes.
Since the rod is bent in the shape of a square therefore the mass of each side of the square is
The moment of inertia of each side about its center of mass is
The distance between two axes
Therefore, the moment of inertia of the side about the parallel axis is
Therefore, the moment of inertia of the rod
Hence the moment of inertia of the rod is