Ch 6.3 Section 10-13

I’m really struggling to grasp the concepts in this section. Especially the lead/lag PF with motor vs gen. In the lesson, a form of this is written for each type of excitation: This occurs when: Re{Eo} = |E|, I and E are now in phase since I  = Ex/jXs = (Eo - E)/jXs  

I do not understand for the life of me how we know that I and E are in phase because I  = Ex/jXs = (Eo - E)/jXs. Can someone please try to explain this to me differently than how it was explained in this text? Thank you!!