The equation equals the change in Y over the change of X. If you notice on the table, the x value increases by a unit of 1, and the y value increases by a unit of 2. If you put those two units into the equation of the change in Y/the change of X you will get 2/1=2. The slope is 2. Now plug in the two into y=mx+b form and you will get y=2x. You can check this by taking any y value on the table, multiplying it by 2, and verifying that the value matches the corresponding Y value.