0,0
1
2
3
4
5
6
7
8
9
10
11
12
−1
−2
−3
−4
−5
−6
−7
−8
−9
−10
−11
−12
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
−1
−2
−3
−4
−5
−6
−7
−8
−9
−10
−11
−12
−13
−14
−15
P_1
P_2
First Method.
You are given that the line goes through $(0,\var{b})$ and $(-1,\var{b-a})$ and the equation of the line is of the form $y=ax+b$
Hence:
1) At $x=0$ we have $y=\var{b}$, and this gives $\var{b}=a \times 0 +b =b$ on putting $x=0$ into $y=ax+b$.
So $b=\var{b}$.
2) At $x=-1$ we have $y=\var{b-a}$, and this gives $\var{b-a}=a \times (-1) +b =\simplify[all,!collectNumbers]{-a+{b}}$ on putting $x=-1$ into $y=ax+b$.
On rearranging we obtain $a=\simplify[all,!collectNumbers]{{b}-{b-a}}=\var{a}$.
So $a=\var{a}$.
So the equation of the line is $\simplify{y={a}*x+{b}}$.
Second Method.
The equation $y=ax+b$ tells us that the graph crosses the $y$-axis (when $x=0$) at $y=b$.
So looking at the graph we immediately see that $b=\var{b}$.
$a$ is the gradient of the line and is given by the change from $(-1,\var{b-a})$ to $(0,\var{b})$:
\[a=\frac{\text{Change in y}}{\text{Change in x}}=\frac{\simplify[all,!collectNumbers]{({b-a}-{b})}}{-1-0}=\var{a}\]