It's been a long time since calculus and physics, but let me see if I can figure out the basic concepts.
As the masses get closer, the gravitational force increases. Therefore, their acceleration will increase as they come closer together. If they had the same mass, then they maximal acceleration would be at 1
r from their starting positions. In this instance I would set up the differential equation to go from 0 to 1
r (don't ask me what the equation would look like, but pretty sure it would end with d
t). However, if the masses are not the same I am not sure how it would be done. I am guessing that you would first have to figure out the point at which they would collide from their starting positions, and then calculate the time.
Second, they are point masses. So can they actually collide, or would they oscillate in an asymptotic pattern? Normally masses have an outer, physical limit. For instance, if you said that the masses have a radius of
r and their centers of mass were 4
r apart it might be a simpler question.