In order to find the equation of the line, you take into account that the general form of the equation of a line is:

where m is the slope and b is the y-intercept.
You calculate the slope m of the line by using the following formula:

where (x1,y1) and (x2,y2) are two points of the line. You use the given points (1,2) and (4,8):

Next, you use again the formula for the slope, but in the following way:

where (x1,y1) is a point of the line. You use the point (1,2):

Next, you solve the previous equation for y, then you replace the value of m and put the equation in the slope y-intercept form:

Hence, the equation of the line is y = 2x