Proof: Let OPT be any optimal solution, and G be the greedy solution. Let be greedy's first choice (activity ending earliest). Let be OPT's first activity.
Case : . No difference here; move to the next activity.
Case : . Since ends earliest, . Create OPT' by replacing with in OPT. Is OPT' valid? Yes! Since ends no later than , it does not conflict with OPT's later activities (they started after P10 ended). OPT' has the same number of activities as OPT, so it is still optimal.