We have a line passing through two points, we can employ the equation of a line in two-point form to obtain this line;
The equation is, for points

The equation of a line passing through both points is;

For the points (2, -4) and (6, 10), we have

Therefore the equation of the line is y = (7/2)x - 22