This is not so much a problem as it is a conceptual question. You're calculating the moment of inertia of a composite shape, lets say a square and a triangle. The square however has a hole inside of it. How does this change the computation of the moment of inertia? This is in a 2-D plane. My guess would be that it only affects the area of the square but not any part of the calculation involving x or y.