well, this is actually a basically math (geometry) problem.

once, you know the solution on math level, just translate it to the programming language you use.

btw: which programming language DO you use?

so, 1 point, either yes or no if it is on one of the 3 lines?

divide an conquer: you have to check, for the 3 lines between the 3 possible pairs of 2 points each time, if the point is on that line.

say, the 2 points are A and B, and the point to check is C

to know if a point is on a segment, 2 checks:

check 1: what is the Angle between AB and AC? if 0 -> then C is on the half-segment [AB)

check 2: what is the distance AB compared to the distance A? if 0 <= AC <= AB -> then C is closer to A than B

if both checks are true, then C is on the segment AB, hence on the line between A and B

once, you know the solution on math level, just translate it to the programming language you use.

btw: which programming language DO you use?

so, 1 point, either yes or no if it is on one of the 3 lines?

divide an conquer: you have to check, for the 3 lines between the 3 possible pairs of 2 points each time, if the point is on that line.

say, the 2 points are A and B, and the point to check is C

to know if a point is on a segment, 2 checks:

check 1: what is the Angle between AB and AC? if 0 -> then C is on the half-segment [AB)

check 2: what is the distance AB compared to the distance A? if 0 <= AC <= AB -> then C is closer to A than B

if both checks are true, then C is on the segment AB, hence on the line between A and B