In determining gravitational energy of a two body system,we define it as the negative work done by gravitational force in bringing those two bodies from infinity to a distance $r$ with respect to the first body.
Now in doing this, we say that work done by gravity in bringing the first body to a certain distance is $0$ because there is no gravitational field in our destination. And then we calculate the work done in bringing the second body due to the gravitational field created by first body.
But I didn't get why work done by first body is $0$. Because as the first body starts moving from infinity,gravitational force still backwards between that body and the second body though the first body is moving forward. In that case,how can work done be $0$?