Bending Moment for a beam ft. Macaulay's method

This problem looks at a simply supported beam undergoing a relatively complicated loading scenario, and the goal is to find an expression of the bending moment as a function of distance.