Hi there! Thank you for the opportunity to help you with your question!
First, the centroid of a composite shape is equal to the weighted average of the centroid of the simple shapes. The centroid of a square (left part of the figure), is the midpoint position (5,5).
Now we look at the triangle, which has base= 8 and height = 10. The centroid of a right triangle is (b/3,h/3) if the triangle's right-angle vertex is at the origin. Since the vertex is at (10,0), the centroid is:
Now we need to take the weighted average:
x_centroid = (38/3*40 + 5*100)/140 = 7.19 [this formula is centroid_triangle*area_triangle + centroid_square*area_square, all divided by total area
y_centroid = (10/3*40 + 5*100)/140 = 4.52
So the centroid is at (7.19, 4.52) inches
Please let me know if you need any clarification. Always glad to help!