I'll take a crack at this...

If you have an ellipse with equation

or

,

then the eccentricity e is

,

where

.

The eccentricity relates to the shape of the ellipse, and it tells us how far off-center the foci are. In ellipses, . If e is close to 0 then the foci are close to the center, and if e is close to 1 then the foci are close to the vertices.

In an elliptical orbit, the perihelion (minimum distance) is a - c, and the aphelion (maximum distance) is a + c. Since you mention distances "from the surface of the earth," we'll have to add on the radius of the earth.

Minimum distance:

a - c = 6540 + 6400

a - c = 12940

Maximum distance:

a + c = 22380 + 6400

a + c = 28780

You have two equations and two unknowns. Solve for a and c.

a - c = 12940

a + c = 28780

2a = 41720

a = 20860

20860 + c = 28780

c = 7920

The eccentricity e, therefore, is

.

Edit:Fixed typo.

01