Your going to use the line equation (y = mx+b) passing through your two points.
1. To do this first find your slope. The slope is going to be the m in your line equation. Using the slope equation:
slope= y2 -y1 / x2-x1 --> 2-0 / 1- (-1) = m = 1
2. Plug the slope into your y = mx+b equation and plug in one of your points to find b.
i.e. y = 1x + b ---> 2 = 1 x 1 + b --> 2/1 = b =1
Now put it all together: y = 1x + 1