How does "Greedy Stays Ahead" Prove an Optimal Greedy Algorithm?
What we are saying is that if A is not optimal, then the number of jobs in A (let it be k) should be less than the number of jobs in O ( let it be m). 

That means, there must be (k+1)-th job in O, while the k-th job is the last job in A. 

Since (k+1)-th job in O must start after k-th job in O, and we know that any i-th job in A finishes earlier than i-th job in O, that means k-th job in A finishes earler than k-th job in O. 

That means, the (k+1)-th job in O can be added to A, which contradicts that A only has k jobs. Hence, A must be optimal and it must have m items.