Most likely gravity, because the gravity would pull it off course or wobble.
I think this is the answer. I hope you can understand.
The question is poor. Light doesn't refract on its way THROUGH anything. It refracts at the boundary BETWEEN two different media. The effect is greatest where the ratio of the speeds of light in the two media is greatest. On your list, that would be at the boundary between air or space and glass.
Answer:
System D --> System C --> System A --> System B
Explanation:
The gravitational force between two masses m1, m2 separated by a distance r is given by:

where G is the gravitational constant. Let's apply this formula to each case now to calculate the relative force for each system:
System A has masses m and m separated by a distance r:

system B has masses m and 2m separated by a distance 2r:

system C has masses 2m and 3m separated by a distance 2r:

system D has masses 4m and 5m separated by a distance 3r:

Now, by looking at the 4 different forces, we can rank them from the greatest to the smallest force, and we find:
System D --> System C --> System A --> System B