How to find B in the expression of definite function

How to find B in the expression of definite function

y=kx+b
Just find 2 points to put in
For example, (- 2,0) (0,1) is substituted by y = KX + B
-2k+b=0
0*k+b=1
The solution is k = 1 / 2
b=1
It's like this