How far away from the earth is Halley's comet?
Halley's comet is currently close to aphelion and is about 34AU from Earth.
Halley's comet has a semi-major axis
First we calculate the number of years
We then calculate the mean anomaly
Then we calculate the eccentric anomaly
The distance of the comet from the Sun is then
The distance of the comet from Earth is then
Solving the equations for 11 May 2016 puts the comet at a distance of about 34AU from the Sun. Its aphelion distance is 35.1AU.
Halley's comet doesn't actually obey Kepler's laws as its orbit will be perturbed by any planets it passes near to at any time during its orbit. It is however a reasonable approximation.