Explanation:
right, M = ((xa + xb)/2, (ya + yb)/2) = (3.5, 3.5)
the line through O and M (I assume we need the slope-intercept form) is in general
y = ax + b
"a" is the slope, "b" is the y-intercept (the y-value when x = 0).
the slope is the ratio (y coordinate change / x coordinate change) when going from one point on the line to another.
so, our 2 points : (0, 0) and (3.5, 3.5).
x changes by +3.5 (from 0 to 3.5).
y changes by +3.5 (from 0 to 3.5).
so, the slope "a" is +3.5/+3.5 = 1.
the point (0, 0) gives us "b" (the y-value when x = 0) directly : 0.
so, the line equation is
y = x