Two moving bodies collision
In this setup, you will need to add keyframes for the kinematic property. The kinematic property should be enabled during the beginning so that the object movement is controlled by the animation. Right before the two objects collide, the kinematic property should be disabled so that the rigid body simulator takes control over the object movement.

Here is an example for how to modify your script so that the kinematic property is disabled at frame 12:

bpy.data.objects['Cube'].rigid_body.kinematic = True
bpy.data.objects['Cube'].keyframe_insert(data_path='rigid_body.kinematic', frame=1)
bpy.data.objects['Cube'].location = [-5,-5,1]
bpy.data.objects['Cube'].keyframe_insert(data_path='location', frame=1)
bpy.data.objects['Cube'].location = [0,0,1]
bpy.data.objects['Cube'].keyframe_insert(data_path='location', frame=20)
bpy.data.objects['Cube'].rigid_body.kinematic = False
bpy.data.objects['Cube'].keyframe_insert(data_path='rigid_body.kinematic', frame=12)

bpy.data.objects['Sphere'].rigid_body.kinematic = True
bpy.data.objects['Sphere'].keyframe_insert(data_path='rigid_body.kinematic', frame=1)
bpy.data.objects['Sphere'].location = [5,-5,1]
bpy.data.objects['Sphere'].keyframe_insert(data_path='location', frame=1)
bpy.data.objects['Sphere'].location = [0,0,1]
bpy.data.objects['Sphere'].keyframe_insert(data_path='location', frame=20)
bpy.data.objects['Sphere'].rigid_body.kinematic = False
bpy.data.objects['Sphere'].keyframe_insert(data_path='rigid_body.kinematic', frame=12)
```