The equations given aren't enough, you have to break it down. This is only for symmetrical beams. The equation given works well for rectangular beams, not for I beams. Irregular beams have to have all sections calculated (regular ones like this can also have each part calculated). This is best to skip for later as the calculations can take 5-10 minutes.
This is how a structural engineer showed me how to do this question by using the moment of inertia of the individual segments about its own centroid access.