Hey there!!
Slope-intercept form : y = mx + b
Equation given : y = kx + b
Hence, we know k = slope and b is the y-intercept
How, do we find slope?
Formula : 
We have got two co-ordinates : ( 2 , 10 ) and ( -7 , -10 )
Plugging in the values : 
Simplifying it : 
Hence, the slope we got is : 
Now, lets plug in this value in the equation y = kx + b
k is 20/9
Plugging in :
... 
Now let's take a co-ordinate and plug it in...
... 
... 
... 
... y-intercept is 50.
Now, let's get the whole equation in place...
... 
Hope my answer helps!!