I will solve this problem in a general way that would work for any one body parabolic, elliptic or circular orbits. The total energy of an arbitrary classical orbit is derived from its Lagrangian. It is:

`E=T+V=1/2m((dr)/(dt))^2+l^2/(2mr^2)+U(r)`

`l` is the angular momentum and `r` is the radial distance, `r=d` at closest approach.

For the gravitational potential:

`U(r)=-(GmM)/r|_(r=d)=-(GmM)/d`

For a parabolic orbit `E=0` .

`1/2m((dr)/(dt))^2+l^2/(2md^2)-(GmM)/d=0`

At the moment of closest approach the asteroid is at a minimum in `r` , so the change in `r` , `(dr)/(dt)=0` . Also, `l` is exactly tangential so `l=r xx p=dmv` .

`(dmv)^2/(2md^2)=(GmM)/d`

`1/2 mv^2=(GmM)/d`

Notice this relation simplified to the same results one would get as setting its kinetic energy and potential energy equal to each other. This only happened because conveniently the asteroid was at the distance of closest approach.

`d=(2Gm)/v^2`