The total x-distance from A to B is 5 - (-7) = 12.
The x-distance from C to A is -3 -(-7) = 4.
Then the x-distance from C to B is 12 - 4 = 8.
The ratio AC : CB is 4 : 8. These ratio values have a common factor of 4, so we can divide by that to get the simplest integer form:
... AC : CB = 1 : 2 . . . . . the ratio into which point C divides the line segment.
_____
If you perform the same math on y-coordinates, you should get the same answer. If you don't, it means that point C is not on the line AB.