This has sort of the same concept as your earlier question
Use the equation y = mx + b
To find the slope, take the second y value and subtract the first y value. Then take the second x value and subtract the first x value. Divide the answers. You'd get -2 in this case. -2 would be your slope (m).
The substitute any set of x and y values (either (1, 4) or (-2, 10)) and the slope into y = mx + b. You'd get 6 as your y-intercept (b).