Theory
Many straight lines can be written y = mx + c. The number m is the gradient: how much y changes for each 1 increase in x. The number c is the y-intercept, the y-value where x = 0.
Read c first from where the drawn line crosses the vertical axis. Then find m from two exact points using change in y divided by change in x. Put both values into y = mx + c.
In the diagram, the line goes through (0, 3) and (3, 0). The y-intercept is 3 and the gradient is (0 - 3)/(3 - 0) = -1. Its equation is y = -x + 3.
If the gradient and intercept are given directly, substitute them: gradient 2 and y-intercept -4 give y = 2x - 4. A missing x term means gradient 0, as in y = 5.
If neither point is on the y-axis, first find the gradient from the two points. Substitute one point into y = mx + c to solve for c. Check the final equation with the other point.