There was a typo in the text, thank you.

You're right: the hypothenuse is from `p` to `e'`. But the other line I was referring to was `p` to `i`, which is the one in which we are interested, since the length of this segment is the distance from `p` to the ellipse.

I edited the text to reflect that.